How to config simple login/pass authentication for kubernetes desktop UI

前端 未结 1 1746
一个人的身影
一个人的身影 2021-01-13 00:40

I\'m pretty new in kubernetes, I just install kubernetes via kubeadm and run dashboard UI but can\'t config access to it. Following docs I add line --basic-auth-file=/

相关标签:
1条回答
  • 2021-01-13 01:01

    Your file for basic authentication /etc/kubernetes/auth.csv is not available inside kube-apiserver pod's container. It should be mounted to pod's container as well as certificate folders. Just add it to volumes and volumeMounts sections:

        volumeMounts:
        - mountPath: /etc/kubernetes/auth.csv
          name: kubernetes-dashboard
          readOnly: true
      volumes:
      - hostPath:
          path: /etc/kubernetes/auth.csv
        name: kubernetes-dashboard
    
    0 讨论(0)
提交回复
热议问题