一、部署前先检查状态

[root@master ~]# kubectl get nodes
NAME        STATUS   ROLES    AGE    VERSION
20.0.0.16   Ready    <none>   5h2m   v1.12.3
20.0.0.17   Ready    <none>   5h     v1.12.3

[root@master1 ~]# kubectl get pod
NAME                    READY   STATUS    RESTARTS   AGE
nginx-dbddb74b8-84xgw   1/1     Running   0          34m

二、部署UI界面到master节点

2.1 创建dashboard工作目录

[root@master ~]# mkdir k8s/dashboard

2.2 推送官方的文件到本地

'备注:
k8s创建pod资源有两种方式
命令工具kubectl创建
kubectl run --image=
使用yaml文件格式进行创建
kubectl create -f (yaml文件)

https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard

dashboard-configmap.yaml 配置映射服务
dashboard-deployment.yaml 控制器
dashboard-rbac.yaml 角色控制,访问控制
dashboard-secret.yaml 安全
dashboard-service.yaml 服务
这些资源创建时,先创建①身份角色②安全③配置映射④控制器⑤服务
这里我使用dashboard的1.8.4版本
1.8.4版本中有一个配置文件叫controller.yaml,现在的是1.10版本,名称改为deployment.yaml,都是控制器'
[root@master1 ~]# cd /k8s/dashboard/
[root@master1 dashboard]# ls
dashboard-configmap.yaml  dashboard-controller.yaml  dashboard-rbac.yaml  dashboard-secret.yaml  dashboard-service.yaml  k8s-admin.yaml

2.3 查看这些文件的详细参数

dashboard-configmap.yaml

apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    k8s-app: kubernetes-dashboard
    # Allows editing resource and makes sure it is created first.
    addonmanager.kubernetes.io/mode: EnsureExists
  name: kubernetes-dashboard-settings
  namespace: kube-system

dashboard-controller.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    k8s-app: kubernetes-dashboard
    addonmanager.kubernetes.io/mode: Reconcile
  name: kubernetes-dashboard
  namespace: kube-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubernetes-dashboard
  namespace: kube-system
  labels:
    k8s-app: kubernetes-dashboard
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: Reconcile
spec:
  selector:
    matchLabels:
      k8s-app: kubernetes-dashboard
  template:
    metadata:
      labels:
        k8s-app: kubernetes-dashboard
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ''
        seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
    spec:
      priorityClassName: system-cluster-critical
      containers:
      - name: kubernetes-dashboard
        image: siriuszg/kubernetes-dashboard-amd64:v1.8.3
        resources:
          limits:
            cpu: 100m
            memory: 300Mi
          requests:
            cpu: 50m
            memory: 100Mi
        ports:
        - containerPort: 8443
          protocol: TCP
        args:
          # PLATFORM-SPECIFIC ARGS HERE
          - --auto-generate-certificates
        volumeMounts:
        - name: kubernetes-dashboard-certs
          mountPath: /certs
        - name: tmp-volume
          mountPath: /tmp
        livenessProbe:
          httpGet:
            scheme: HTTPS
            path: /
            port: 8443
          initialDelaySeconds: 30
          timeoutSeconds: 30
      volumes:
      - name: kubernetes-dashboard-certs
        secret:
          secretName: kubernetes-dashboard-certs
      - name: tmp-volume
        emptyDir: {}
      serviceAccountName: kubernetes-dashboard
      tolerations:
      - key: "CriticalAddonsOnly"
        operator: "Exists"

dashboard-rbac.yaml

kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
    addonmanager.kubernetes.io/mode: Reconcile
  name: kubernetes-dashboard-minimal
  namespace: kube-system
rules:
  # Allow Dashboard to get, update and delete Dashboard exclusive secrets.
- apiGroups: [""]
  resources: ["secrets"]
  resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs"]
  verbs: ["get", "update", "delete"]
  # Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.
- apiGroups: [""]
  resources: ["configmaps"]
  resourceNames: ["kubernetes-dashboard-settings"]
  verbs: ["get", "update"]
  # Allow Dashboard to get metrics from heapster.
- apiGroups: [""]
  resources: ["services"]
  resourceNames: ["heapster"]
  verbs: ["proxy"]
- apiGroups: [""]
  resources: ["services/proxy"]
  resourceNames: ["heapster", "http:heapster:", "https:heapster:"]
  verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: kubernetes-dashboard-minimal
  namespace: kube-system
  labels:
    k8s-app: kubernetes-dashboard
    addonmanager.kubernetes.io/mode: Reconcile
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: kubernetes-dashboard-minimal
subjects:
- kind: ServiceAccount
  name: kubernetes-dashboard
  namespace: kube-system

dashboard-secret.yaml

apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
    # Allows editing resource and makes sure it is created first.
    addonmanager.kubernetes.io/mode: EnsureExists
  name: kubernetes-dashboard-certs
  namespace: kube-system
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
  labels:
    k8s-app: kubernetes-dashboard
    # Allows editing resource and makes sure it is created first.
    addonmanager.kubernetes.io/mode: EnsureExists
  name: kubernetes-dashboard-key-holder
  namespace: kube-system
type: Opaque

dashboard-service.yaml

apiVersion: v1
kind: Service
metadata:
  name: kubernetes-dashboard
  namespace: kube-system
  labels:
    k8s-app: kubernetes-dashboard
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: Reconcile
spec:
  type: NodePort
  selector:
    k8s-app: kubernetes-dashboard
  ports:
  - port: 443
    targetPort: 8443
    nodePort: 30001

2.4 基于yaml文件创建pod资源

2.4.1 先rbac角色控制管理

'当前命名空间状态:'
[root@master dashboard]# kubectl get ns
NAME          STATUS   AGE
default       Active   5h37m
kube-public   Active   5h37m
kube-system   Active   5h37m


[root@master dashboard]# kubectl get pod -n kube-system
NAME                                    READY   STATUS    RESTARTS   AGE
kubernetes-dashboard-7dffbccd68-6xqxm   1/1     Running   0          15h


[root@master dashboard]# kubectl get all	
'#这个all 包含pod、deployment、service和副本replicaset四个资源'
NAME                        READY   STATUS    RESTARTS   AGE
pod/nginx-dbddb74b8-84xgw   1/1     Running   0          17h

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.0.0.1     <none>        443/TCP   21h

NAME                    DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx   1         1         1            1           17h

NAME                              DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-dbddb74b8   1         1         1       17h


'查看当前k8s中的角色:'
[root@master dashboard]# kubectl get Role -n kube-system
NAME                                             AGE
extension-apiserver-authentication-reader        21h
kubernetes-dashboard-minimal                     16h
system::leader-locking-kube-controller-manager   21h
system::leader-locking-kube-scheduler            21h
system:controller:bootstrap-signer               21h
system:controller:cloud-provider                 21h
system:controller:token-cleaner                  21h

开始创建rbac资源
[root@master dashboard]# kubectl create -f dashboard-rbac.yaml
role.rbac.authorization.k8s.io/kubernetes-dashboard-minimal created
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard-minimal created

查看创建后的资源状态
[root@master1 dashboard]# kubectl get all
NAME                        READY   STATUS    RESTARTS   AGE
pod/nginx-dbddb74b8-84xgw   1/1     Running   0          17h

NAME                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.0.0.1     <none>        443/TCP   21h

NAME                    DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx   1         1         1            1           17h

NAME                              DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-dbddb74b8   1         1         1       17h


'查看角色,在配置文件中,角色的命名空间指定的是kube-system,所以查看的时候要-n指定:'
[root@master dashboard]# kubectl get role
No resources found.

[root@master dashboard]# kubectl get role -n kube-system
NAME                                             AGE
extension-apiserver-authentication-reader        21h
kubernetes-dashboard-minimal                     54s
system::leader-locking-kube-controller-manager   21h
system::leader-locking-kube-scheduler            21h
system:controller:bootstrap-signer               21h
system:controller:cloud-provider                 21h
system:controller:token-cleaner                  21h

2.4.2 创建安全secret资源

'先查看状态'
[root@master dashboard]# kubectl get secret #不指向命名空间代表默认空间
NAME                  TYPE                                  DATA   AGE
default-token-t6zqv   kubernetes.io/service-account-token   3      21h

[root@master dashboard]# kubectl get secret -n kube-system
NAME                               TYPE                                  DATA   AGE
dashboard-admin-token-zdx69        kubernetes.io/service-account-token   3      15h
default-token-q7n9z                kubernetes.io/service-account-token   3      21h
kubernetes-dashboard-certs         Opaque                                11     15h
kubernetes-dashboard-key-holder    Opaque                                2      16h
kubernetes-dashboard-token-xz55r   kubernetes.io/service-account-token   3      15h

'创建secret资源'
[root@master dashboard]# kubectl create -f dashboard-secret.yaml
secret/kubernetes-dashboard-certs created
secret/kubernetes-dashboard-key-holder created


'再次查看状态'
[root@master dashboard]# kubectl get secret -n kube-system
NAME                               TYPE                                  DATA   AGE
dashboard-admin-token-zdx69        kubernetes.io/service-account-token   3      15h
default-token-q7n9z                kubernetes.io/service-account-token   3      21h
kubernetes-dashboard-certs         Opaque                                0      9s
kubernetes-dashboard-key-holder    Opaque                                0      9s
kubernetes-dashboard-token-xz55r   kubernetes.io/service-account-token   3      15h

2.4.3 创建配置映射资源configmap

'先查看状态'
[root@master dashboard]# kubectl get ConfigMap
No resources found.

[root@master dashboard]# kubectl get configmap -n kube-system
NAME                                 DATA   AGE
extension-apiserver-authentication   1      21h
kubernetes-dashboard-settings        0      16h

'开始创建'
[root@master dashboard]# kubectl create -f dashboard-configmap.yaml
configmap/kubernetes-dashboard-settings created

'再次查看状态'
[root@master dashboard]# kubectl get configmap -n kube-system
NAME                                 DATA   AGE
extension-apiserver-authentication   1      21h
kubernetes-dashboard-settings        0      11s

2.4.4 创建控制器资源

[root@master dashboard]# kubectl create -f dashboard-controller.yaml
serviceaccount/kubernetes-dashboard created
deployment.apps/kubernetes-dashboard created

'可以发现创建了两种资源
serviceaccount deployment.apps
服务访问和deployment控制器资源'

[root@master dashboard]# kubectl get serviceaccount -n kube-system
NAME                   SECRETS   AGE
dashboard-admin        1         15h
default                1         21h
kubernetes-dashboard   1         11s

[root@master dashboard]# kubectl get deployment.apps -n kube-system
NAME                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
kubernetes-dashboard   1         1         1            1           29s

[root@master dashboard]# kubectl get deployment.apps
NAME    DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
nginx   1         1         1            1           17h

2.4.5 创建service资源

'备注:
创建的pod资源只是提供业务,还需要其他资源调配一起配合使用
kubectl get all种包含pod、deployment、service和副本replicaset四个资源
deployment和replica会随着pod自动创建
在pod运行的情况下,
一旦开启service资源,那么服务就会被启用,开启端口'
[root@master dashboard]# cat dashboard-service.yaml
apiVersion: v1
kind: Service
metadata:
  name: kubernetes-dashboard
  namespace: kube-system
  labels:
    k8s-app: kubernetes-dashboard
    kubernetes.io/cluster-service: "true"
    addonmanager.kubernetes.io/mode: Reconcile
spec:
  type: NodePort
  selector:
    k8s-app: kubernetes-dashboard
  ports:
  - port: 443	#开启的是443端口
    targetPort: 8443
    nodePort: 30001	#节点端口

'查看当前状态:'
[root@master dashboard]# kubectl get service
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.0.0.1     <none>        443/TCP   21h

'开始创建:'
[root@master dashboard]# kubectl create -f dashboard-service.yaml
service/kubernetes-dashboard created

'查看状态:'
[root@master dashboard]# kubectl get service -n kube-system
NAME                   TYPE       CLUSTER-IP   EXTERNAL-IP   PORT(S)         AGE
kubernetes-dashboard   NodePort   10.0.0.239   <none>        443:30001/TCP   6s

2.5 统一查看状态

'查看kube-system命名空间的状态,可以发现pod已经创建出来,服务也已经开启'
[root@master dashboard]# kubectl get all -n kube-system
NAME                                        READY   STATUS    RESTARTS   AGE
pod/kubernetes-dashboard-65f974f565-84xgw   1/1     Running   0          2m43s

NAME                           TYPE       CLUSTER-IP   EXTERNAL-IP   PORT(S)         AGE
service/kubernetes-dashboard   NodePort   10.0.0.239   <none>        443:30001/TCP   24s

NAME                                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/kubernetes-dashboard   1         1         1            1           2m43s

NAME                                              DESIRED   CURRENT   READY   AGE
replicaset.apps/kubernetes-dashboard-65f974f565   1         1         1       2m43s

'-o 查看网络状态:'
[root@master dashboard]# kubectl get all -n kube-system -o wide
NAME                                        READY   STATUS    RESTARTS   AGE     IP           NODE        NOMINATED NODE
pod/kubernetes-dashboard-65f974f565-84xgw   1/1     Running   0          5m27s   172.17.6.2   20.0.0.17   <none>

NAME                           TYPE       CLUSTER-IP   EXTERNAL-IP   PORT(S)         AGE    SELECTOR
service/kubernetes-dashboard   NodePort   10.0.0.239   <none>        443:30001/TCP   3m8s   k8s-app=kubernetes-dashboard

NAME                                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE     CONTAINERS             IMAGES                                       SELECTOR
deployment.apps/kubernetes-dashboard   1         1         1            1           5m27s   kubernetes-dashboard   siriuszg/kubernetes-dashboard-amd64:v1.8.3   k8s-app=kubernetes-dashboard

NAME                                              DESIRED   CURRENT   READY   AGE     CONTAINERS             IMAGES                                       SELECTOR
replicaset.apps/kubernetes-dashboard-65f974f565   1         1         1       5m27s   kubernetes-dashboard   siriuszg/kubernetes-dashboard-amd64:v1.8.3   k8s-app=kubernetes-dashboard,pod-template-hash=65f974f565

'由此可以发现,访问https://20.0.0.17:30001便可以访问dashboard
get查看时可以缩写,支持同时查看多个
查看日志'

[root@master dashboard]# kubectl logs kubernetes-dashboard-65f974f565-84xgw
Error from server (NotFound): pods "kubernetes-dashboard-65f974f565-hqvvp" not found

三:访问web

此时就可以去访问nodeIPhttps://20.0.0.17:30001验证,使用谷歌浏览器发现无法访问
在这里插入图片描述

3.1 查看开发人员工具

在安全中发现是不信任的证书
在这里插入图片描述

3.2 解决当前浏览器无法访问的问题

3.2.1 颁发证书

'编辑生成证书的脚本:'
[root@master dashboard]# vim dashboard-cert.sh
cat > dashboard-csr.json << EOF
{
    "CN":"Dashboard",
    "hosts":[],
    "key":{
        "algo":"rsa",
        "size":2048
    },
    "names":[
        {
            "C":"CN",
            "L":"BeiJing",
            "ST":"BeiJing"
        }
    ]
}
EOF

K8S_CA=$1
cfssl gencert -ca=$K8S_CA/ca.pem -ca-key=$K8S_CA/ca-key.pem -config=$K8S_CA/ca-config.json -profile=kubernetes dashboard-csr.json | cfssljson -bare dashboard
kubectl delete secret kubernetes-dashboard-certs -n kube-system
kubectl create secret generic kubernetes-dashboard-certs --from-file=./ -n kube-system

'查看材料文件路径:'
[root@master dashboard]# ls /opt/kubernetes/ssl/
ca-key.pem  ca.pem  server-key.pem  server.pem

[root@master dashboard]# ls /root/k8s/k8s-cert/
admin.csr       ca-config.json  ca.pem               kube-proxy-key.pem  server-key.pem
admin-csr.json  ca.csr          k8s-cert.sh          kube-proxy.pem      server.pem
admin-key.pem   ca-csr.json     kube-proxy.csr       server.csr
admin.pem       ca-key.pem      kube-proxy-csr.json  server-csr.json


'生成证书:'
[root@master dashboard]# bash dashboard-cert.sh /root/k8s/k8s-cert/
2020/11/21 02:34:08 [INFO] generate received request
2020/11/21 02:34:08 [INFO] received CSR
2020/11/21 02:34:08 [INFO] generating key: rsa-2048
2020/11/21 02:34:08 [INFO] encoded CSR
2020/11/21 02:34:08 [INFO] signed certificate with serial number 43571394646327439785224651879863842251757367626
2020/11/21 02:34:08 [WARNING] This certificate lacks a "hosts" field. This makes it unsuitable for
websites. For more information see the Baseline Requirements for the Issuance and Management
of Publicly-Trusted Certificates, v.1.1.6, from the CA/Browser Forum (https://cabforum.org);
specifically, section 10.2.3 ("Information Requirements").
secret "kubernetes-dashboard-certs" deleted
secret/kubernetes-dashboard-certs created

[root@master dashboard]# ls #只看新增的文件
dashboard-cert.sh          dashboard.csr       dashboard.pem          dashboard-service.yaml
dashboard-configmap.yaml   dashboard-csr.json  dashboard-rbac.yaml    k8s-admin.yaml
dashboard-controller.yaml  dashboard-key.pem   dashboard-secret.yaml

'编辑secret资源的yaml文件:'
[root@master dashboard]# vim dashboard-controller.yaml
 45         args:
 46           # PLATFORM-SPECIFIC ARGS HERE
 47           - --auto-generate-certificates
 48           - --tls-key-file=dashboard-key.pem	#新增
 49           - --tls-cert-file=dashboard.pem		#新增

'重新部署:'
[root@master dashboard]# kubectl apply -f dashboard-controller.yaml
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
serviceaccount/kubernetes-dashboard configured
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
deployment.apps/kubernetes-dashboard configured

'查看此时状态'
MatchInterPodAffinity:
pod在20.0.0.16上

[root@master dashboard]# kubectl get all -n kube-system -o wide
NAME                                        READY   STATUS    RESTARTS   AGE    IP            NODE        NOMINATED NODE
pod/kubernetes-dashboard-7dffbccd68-9khwq   1/1     Running   0          108s   172.17.58.3   20.0.0.16   <none>

NAME                           TYPE       CLUSTER-IP   EXTERNAL-IP   PORT(S)         AGE   SELECTOR
service/kubernetes-dashboard   NodePort   10.0.0.4     <none>        443:30001/TCP   17m   k8s-app=kubernetes-dashboard

NAME                                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS             IMAGES                                       SELECTOR
deployment.apps/kubernetes-dashboard   1         1         1            1           19m   kubernetes-dashboard   siriuszg/kubernetes-dashboard-amd64:v1.8.3   k8s-app=kubernetes-dashboard

NAME                                              DESIRED   CURRENT   READY   AGE    CONTAINERS             IMAGES                                       SELECTOR
replicaset.apps/kubernetes-dashboard-65f974f565   0         0         0       19m    kubernetes-dashboard   siriuszg/kubernetes-dashboard-amd64:v1.8.3   k8s-app=kubernetes-dashboard,pod-template-hash=65f974f565
replicaset.apps/kubernetes-dashboard-7dffbccd68   1         1         1       109s   kubernetes-dashboard   siriuszg/kubernetes-dashboard-amd64:v1.8.3   k8s-app=kubernetes-dashboard,pod-template-hash=7dffbccd68

清空历史记录访问此时节点:
继续前往,发现此时可以访问了!

在这里插入图片描述

四:使用令牌访问

4.1 生成令牌

'k8s-admin.yaml的作用就出现了'
[root@master dashboard]# kubectl create -f k8s-admin.yaml
serviceaccount/dashboard-admin created
clusterrolebinding.rbac.authorization.k8s.io/dashboard-admin created

4.2 查看状态

[root@master dashboard]# kubectl get secret -n kube-system
NAME                               TYPE                                  DATA   AGE
dashboard-admin-token-jlhk6        kubernetes.io/service-account-token   3      8s
default-token-q7n9z                kubernetes.io/service-account-token   3      22h
kubernetes-dashboard-certs         Opaque                                11     4m51s
kubernetes-dashboard-key-holder    Opaque                                2      15m
kubernetes-dashboard-token-mt7kh   kubernetes.io/service-account-token   3      14m

[root@master dashboard]# kubectl get serviceaccount -n kube-system
NAME                   SECRETS   AGE
dashboard-admin        1         38s
default                1         22h
kubernetes-dashboard   1         14m

[root@master dashboard]# kubectl get clusterrolebinding.rbac.authorization.k8s.io -n kube-system
NAME                                                   AGE
cluster-admin                                          8d
cluster-system-anonymous                               5d15h
dashboard-admin                                        2m1s
·······

4.3 查看令牌详细信息

[root@master dashboard]# kubectl describe serviceaccount dashboard-admin -n kube-system
kube-system
Name:                dashboard-admin
Namespace:           kube-system
Labels:              <none>
Annotations:         <none>
Image pull secrets:  <none>
Mountable secrets:   dashboard-admin-token-jlhk6
Tokens:              dashboard-admin-token-jlhk6
Events:              <none>

[root@master dashboard]# kubectl describe tokens dashboard-admin-token-jlhk6 -n kube-system
error: the server doesnt have a resource type "tokens"

[root@master dashboard]# kubectl describe secret dashboard-admin-token-jlhk6 -n kube-system
Name:         dashboard-admin-token-jlhk6
Namespace:    kube-system
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: dashboard-admin
              kubernetes.io/service-account.uid: 99b2a698-2bcc-11eb-9e52-000c2980391a

Type:  kubernetes.io/service-account-token

    Data
====
ca.crt:     1359 bytes
namespace:  11 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkYXNoYm9hcmQtYWRtaW4tdG9rZW4tamxoazYiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiZGFzaGJvYXJkLWFkbWluIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiOTliMmE2OTgtMmJjYy0xMWViLTllNTItMDAwYzI5ODAzOTFhIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Omt1YmUtc3lzdGVtOmRhc2hib2FyZC1hZG1pbiJ9.vYRotrAAuQGzjaPBlFmIhXc-mF0o9tqURPJ_NCB2ghYA4ZRYugU8hzVkQ0NBVPpdzWx5hasp1CGrw3WtPIqrvBAYbP5jSpbe0wrPqtndPCJaFm4OuWUXqRrh-bn5Br0AhSjIGBeAgOCrrdL8A8KwrtbeUOSQJwQYxzgmaYD_323Yi6kTwljAlEdA8Pij76Wz7A7yN9qEpJCIhvQ0zxiPMdcpy7h2r54O7ScU1SxNmNarOT2u9aFSU00qOsaJWApGYBmlb8X-g7dNCookIgkHDk8uzED3HCw9_O4waj6z_Q-lOEY-uSf63-wDZ_KaS_k_emH2Pp7oPnDmwiizedmZmA

'token:后面便是令牌,复制保存'

4.4 复制登录

https://20.0.0.16:30001 //前面必须加https才能登录
在这里插入图片描述
在这里插入图片描述

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐