aws-app-mesh-controller-for-k8s icon indicating copy to clipboard operation
aws-app-mesh-controller-for-k8s copied to clipboard

Installation of Kubernetes dashboard on EKS cluster with AppMesh

Open ShadowScorpion opened this issue 4 years ago • 0 comments

Kindly ask you to help to understand what's the problem appears when I'm installing the Kubernetes Dashboard on the EKS cluster controlled by AppMesh. When I doing the same actions on a simple namespace (without AppMesh) the installation is working well, but when I installing it on a namespace controlled by service mesh, receiving the error. I saw a similar problem with Istio, but didn't find such information about AppMesh (https://github.com/istio/istio/issues/25974 )

I installed the official Kubernetes dashboard https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/

What I have changed is part with namespace :

apiVersion: v1
kind: Namespace
metadata:
  name: shared-system
  labels:
    name: shared-system
    mesh: shared-mesh
    gateway: shared-gateway
    appmesh.k8s.aws/sidecarInjectorWebhook: enabled

And also added two VirtualNodes for AppMesh

apiVersion: appmesh.k8s.aws/v1beta2
kind: VirtualNode
metadata:
  name: kubernetes-dashboard-virtual-node
  namespace: shared-system
spec:
  podSelector:
    matchLabels:
      k8s-app: kubernetes-dashboard
  listeners:
    - portMapping:
        port: 8443
        protocol: http
      healthCheck:
        protocol: http
        path: '/'
        healthyThreshold: 5
        unhealthyThreshold: 5
        timeoutMillis: 2000
        intervalMillis: 5000
  serviceDiscovery:
    dns:
      hostname: dashboard.shared.dev.svc.cluster.local
  logging:
    accessLog:
      file:
        path: /dev/stdout

What in a result, I just got the alert

2021/06/21 08:23:29 Starting overwatch 2021/06/21 08:23:29 Using namespace: kubernetes-dashboard 2021/06/21 08:23:29 Using in-cluster config to connect to apiserver 2021/06/21 08:23:29 Using secret token for csrf signing 2021/06/21 08:23:29 Initializing csrf token from kubernetes-dashboard-csrf secret panic: an error on the server ("") has prevented the request from succeeding (get secrets kubernetes-dashboard-csrf)

goroutine 1 [running]: github.com/kubernetes/dashboard/src/app/backend/client/csrf.(*csrfTokenManager).init(0xc000359920) /home/runner/work/dashboard/dashboard/src/app/backend/client/csrf/manager.go:41 +0x413 github.com/kubernetes/dashboard/src/app/backend/client/csrf.NewCsrfTokenManager(...) /home/runner/work/dashboard/dashboard/src/app/backend/client/csrf/manager.go:66 github.com/kubernetes/dashboard/src/app/backend/client.(*clientManager).initCSRFKey(0xc000191500) /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:502 +0xc6 github.com/kubernetes/dashboard/src/app/backend/client.(*clientManager).init(0xc000191500) /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:470 +0x47 github.com/kubernetes/dashboard/src/app/backend/client.NewClientManager(...) /home/runner/work/dashboard/dashboard/src/app/backend/client/manager.go:551 main.main() /home/runner/work/dashboard/dashboard/src/app/backend/dashboard.go:95 +0x21c

Can somebody assist on this topic? P.S. I have tried to launch the dashboard on HTTP, but it still not fixed the issue

ShadowScorpion avatar Jun 21 '21 08:06 ShadowScorpion