Unable to connect to the server: x509: certificate signed by unknown authority

1 개요[ | ]

Unable to connect to the server: x509: certificate signed by unknown authority
root@wsl:~# kubectl get no
Unable to connect to the server: x509: certificate signed by unknown authority

2 방법 1[ | ]

root@wsl:~# kubectl get no --insecure-skip-tls-verify
NAME              STATUS   ROLES    AGE   VERSION
cluster1-node01   Ready    <none>   19d   v1.21.14
cluster1-node02   Ready    <none>   19d   v1.21.14
cluster1-node03   Ready    <none>   13d   v1.21.14

3 방법 2 ★[ | ]

root@wsl:~# cat /etc/ssl/certs/company.pem | base64 -w0
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tC...VORCBDRVJUSUZJQ0FURS0tLS0tCg==
root@wsl:~# vi ~/.kube/config
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tC...VORCBDRVJUSUZJQ0FURS0tLS0tCg== # 교체
    server: https://135.79.246.80
  name: cluster1
...
root@wsl:~# kubectl get no
NAME              STATUS   ROLES    AGE   VERSION
cluster1-node01   Ready    <none>   19d   v1.21.14
cluster1-node02   Ready    <none>   19d   v1.21.14
cluster1-node03   Ready    <none>   13d   v1.21.14

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}