Get the App
SLTechnology News&Howtos  ›  Servers  › 

Deploy kubernetes-dashboard

Shulou Source: shulou.com Published: 2022-06-03 08:30:23 12月06日 Update

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

Tags: Type online application Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia OPPO Reno macOS Docker