cloud-native-sandbox icon indicating copy to clipboard operation
cloud-native-sandbox copied to clipboard

kiali login failed

Open edocevol opened this issue 7 years ago • 9 comments

Environment

  • OS:
  • Kubernetes version:
  • Docker version:

Environment as this

What I did?

When I started kiali and login, I got the following msg.

The Kiali secret is missing. Users are prohibited from accessing Kiali until an administrator creates a valid secret and restarts Kiali. Please refer to the Kiali documentation for more details.

Messages

Logs or error messages. image

What's more

where is nothing show when I open service_grpha page in browser.

image

edocevol avatar Mar 07 '19 05:03 edocevol

@edocevol I meet the same problem didn't solve it yet.

rootsongjc avatar Mar 07 '19 07:03 rootsongjc

Downgrade to v0.15.0 can temporarily solve this problem. Issue

pandazki avatar Mar 12 '19 09:03 pandazki

istio1.1.1,kiali的deployment定义,用户和密码保存在secret:kiali中了:

$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system --values install/kubernetes/helm/istio/values.yaml --set gateways.istio-ingressgateway.type=NodePort --set grafana.enabled=true --set kiali.enabled=true --set kiali.dashboard.username=admin --set kiali.dashboard.passphrase=admin --set servicegraph.enabled=true --set tracing.enabled=true
...
# Source: istio/charts/kiali/templates/deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kiali
  namespace: istio-system
  labels: 
    app: kiali
    chart: kiali
    heritage: Tiller
    release: istio
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kiali
  template:
    metadata:
      name: kiali
      labels: 
        app: kiali
        chart: kiali
        heritage: Tiller
        release: istio
      annotations:
        sidecar.istio.io/inject: "false" 
        scheduler.alpha.kubernetes.io/critical-pod: ""
    spec:   
      serviceAccountName: kiali-service-account
      containers:
      - image: "docker.io/kiali/kiali:v0.14"
        name: kiali
        command:
        - "/opt/kiali/kiali"
        - "-config"
        - "/kiali-configuration/config.yaml"
        - "-v"  
        - "4"   
        env:    
        - name: ACTIVE_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: SERVER_CREDENTIALS_USERNAME
          valueFrom:
            secretKeyRef:
              name: kiali
              key: username
              optional: true
        - name: SERVER_CREDENTIALS_PASSWORD
          valueFrom:
            secretKeyRef:
              name: kiali
              key: passphrase
              optional: true
...

创建secrets:kiali之后重启pod就可以解决问题:

$ kubectl get secret -n istio-system kiali
Error from server (NotFound): secrets "kiali" not found
$ kubectl create secret generic kiali -n istio-system --from-literal=username=admin --from-literal=passphrase=admin
secret/kiali created

wangxyd avatar Apr 02 '19 09:04 wangxyd

I also ran into this issue with version 0.14 (deployed with Istio 1.1.2) and 0.18 (the latest available release) of kiali on GKE. The version, 0.15, works as expected and finds the secret.

garystafford avatar Apr 12 '19 00:04 garystafford

I meet the same problem...

wuyongdec avatar Aug 30 '19 08:08 wuyongdec

I will check it next week.

rootsongjc avatar Aug 30 '19 11:08 rootsongjc

I will check it next week. step 1: kubectl create secret generic kiali -n istio-system --from-literal=username=admin --from-literal=passphrase=admin step 2: kubectl -n istio-system delete po kiali-xxxxx step 3: i guess it have been worked

sunvim avatar Sep 28 '19 09:09 sunvim

I will check it next week. step 1: kubectl create secret generic kiali -n istio-system --from-literal=username=admin --from-literal=passphrase=admin step 2: kubectl -n istio-system delete po kiali-xxxxx step 3: i guess it have been worked

saved my day, thanks. +1 on issue

ChaturvediSulabh avatar Nov 20 '19 16:11 ChaturvediSulabh

apiVersion: v1
kind: Secret
metadata:
  name: kiali
  namespace: istio-system
  labels:
    app: kiali
    release: istio
type: Opaque
data:
  username: YWRtaW4=   # admin
  passphrase: YWRtaW4= # admin

shalk avatar Mar 23 '20 06:03 shalk