简体   繁体   中英

How to update kubernetes certificates with docker desktop on MacOS

I am using kube.netes with docker desktop on MacOS Monterey. I have problem with starting kube.netes, because 1 year passed and my kube.netes certificates are invalid.

How can I renew them?

Error message:

Error: Kubernetes cluster unreachable: Get "https://kubernetes.docker.internal:6443/version": EOF

I tried to install kubeadm but I think it is only suitable if I use minikube .

Edit: I am using Mac with M1 chip.

You will need to create a new set of certificates and keys in order to update the certificates used by Docker Desktop for MacOS. After that, you will need to add the new certificates and keys to the Kube.netes configuration file. Create a certificate signing request (CSR) first, then use the CSR to create new certificates and keys. The Kube.netes configuration file needs to be updated to point to the new certificates and keys after they have been obtained in the appropriate directory structure. Finally, in order for the brand-new certificates and keys to take effect, you will need to restart your Kube.netes cluster.

Using the minikube command-line tool.Use the minikube delete command to get rid of the existing cluster is the first step in updating the certificates. The minikube start command can be used to create a new cluster with the updated certificates after the cluster has been deleted. Finally, save the cluster configuration file with the most recent certificates by employing the minikube get-kube-config command.

Check for the kube.netes version if you are using an older version upgrade it to the latest version,the Kube.netes version can be upgraded after a Docker Desktop update. However, when a new Kube.netes version is added to Docker Desktop, the user needs to reset its current cluster in order to use the newest version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM