Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Deploy kubernetes-dashboard

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Online deployment

Kubectl apply-f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml

For ease of use, change the Service type to NodePort

Kubectl edit service/kubernetes-dashboard-n kubernetes-dashboard

Add type: NodePort

Modify nodePort: 30001

And save

ApiVersion: v1kind: Servicemetadata: annotations: kubectl.kubernetes.io/last-applied-configuration: {"apiVersion": "v1", "kind": "Service", "metadata": {"annotations": {}, "labels": {"k8s-app": "kubernetes-dashboard"}, "name": "kubernetes-dashboard", "namespace": "kubernetes-dashboard"}, "spec": {"ports": [{"port": 443, "targetPort": 8443}] "selector": {"k8s-app": "kubernetes-dashboard"}} creationTimestamp: "2020-01-07T16:31:17Z" labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard namespace: kubernetes-dashboard resourceVersion: "13889" selfLink: / api/v1/namespaces/kubernetes-dashboard/services/kubernetes-dashboard uid: 26fbfe40-bace-40e5-9a59-efdbb38cca4fspec: clusterIP: 10.110.70.158 externalTrafficPolicy: Cluster ports:-nodePort: 30001 port: 443protocol : TCP targetPort: 8443 selector: k8s-app: kubernetes-dashboard sessionAffinity: None type: NodePortstatus: loadBalancer: {}

After that, apply dashboard-adminuser.yaml:

ApiVersion: v1kind: ServiceAccountmetadata: name: admin-user namespace: kubernetes-dashboard---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: admin-userroleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-adminsubjects:- kind: ServiceAccount name: admin-user namespace: kubernetes-dashboard

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report