However , when I try to access kubernetes-dashboard. It showed
Safari can't open the page "https://idc-k8s-01:4443/". The error is: "The certificate for this server is invalid. You might be connecting to a server that is pretending to be "idc-k8s-01" which could put your confidential information at risk." (MSURLErrorDomain:-1.202)
Here is my deployment status
[root@idc-k8s-01 ~]# kubectl get pods -n kubernetes-dashboard
NAME READY STATUS RESTARTS AGE
dashboard-metrics-scraper-7b8b58dc8b-m74cf 1/1 Running 0 49m
kubernetes-dashboard-6cfc8c4c9-44vdk 1/1 Running 0 49m
[root@idc-k8s-01 ~]# kubectl port-forward -n kubernetes-dashboard svc/kubernetes-dashboard 4443:443 --address 0.0.0.0
Forwarding from 0.0.0.0:4443 -> 8443
Handling connection for 4443
Handling connection for 4443
Logs
[root@idc-k8s-01 work]# kubectl logs -n kubernetes-dashboard kubernetes-dashboard-6cfc8c4c9-44vdk
2024/04/01 13:31:43 Starting overwatch
2024/04/01 13:31:43 Using namespace: kubernetes-dashboard
2024/04/01 13:31:43 Using in-cluster config to connect to apiserver
2024/04/01 13:31:43 Using secret token for csrf signing
2024/04/01 13:31:43 Initializing csrf token from kubernetes-dashboard-csrf secret
2024/04/01 13:31:43 Empty token. Generating and storing in a secret kubernetes-dashboard-csrf
2024/04/01 13:31:43 Successful initial request to the apiserver, version: v1.16.6
2024/04/01 13:31:43 Generating JWE encryption key
2024/04/01 13:31:43 New synchronizer has been registered: kubernetes-dashboard-key-holder-kubernetes-dashboard. Starting
2024/04/01 13:31:43 Starting secret synchronizer for kubernetes-dashboard-key-holder in namespace kubernetes-dashboard
2024/04/01 13:31:45 Initializing JWE encryption key from synchronized object
2024/04/01 13:31:45 Creating in-cluster Sidecar client
2024/04/01 13:31:45 Auto-generating certificates
2024/04/01 13:31:45 Successful request to sidecar
2024/04/01 13:31:45 Successfully created certificates
2024/04/01 13:31:45 Serving securely on HTTPS port: 8443
2024/04/01 13:33:51 http: TLS handshake error from 127.0.0.1:50580: remote error: tls: unknown certificate
2024/04/01 13:33:51 http: TLS handshake error from 127.0.0.1:50594: remote error: tls: unknown certificate
2024/04/01 13:34:00 http: TLS handshake error from 127.0.0.1:55552: remote error: tls: unknown certificate
2024/04/01 13:34:03 http: TLS handshake error from 127.0.0.1:48098: remote error: tls: unknown certificate
2024/04/01 13:34:03 http: TLS handshake error from 127.0.0.1:48102: remote error: tls: unknown certificate
2024/04/01 13:34:30 http: TLS handshake error from 127.0.0.1:46716: remote error: tls: unknown certificate
Document version v1.16
Symptom
Step 08-3.dashboard插件.md
I had already done A.浏览器访问kube-apiserver安全端口.md and can access to the https://idc-k8s-01:6443
However , when I try to access
kubernetes-dashboard
. It showedHere is my deployment status
Logs