1. 程式人生 > >kubespray -- k8s叢集dashboard 訪問方式

kubespray -- k8s叢集dashboard 訪問方式

1.參考這篇文章:

https://github.com/kubernetes/dashboard/wiki/Creating-sample-user

建立使用者

2.獲取token

3.kubectl get svc --all-namespaces

kube-system   kubernetes-dashboard               NodePort       10.233.31.8     <none>        443:32666/TCP

4.修改type

spec:
clusterIP: 10.233.31.8
externalTrafficPolicy: Cluster
ports:
- nodePort: 32666
port: 443
protocol: TCP
targetPort: 8443
selector:
k8s-app: kubernetes-dashboard
sessionAffinity: None
type: NodePort