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

posted @ 2018-11-21 00:09  littlevigra  阅读(2227)  评论(0编辑  收藏  举报