1

For testing purposes I have disabled tls verification for my cluster by typing:

$ kubectl get nodes --insecure-skip-tls-verify

This was done to temporarily fix a problem with an invalid certificate. Now that my certificate is valid again, I don't know how to enable tls verfication once again, without creating a completely new cluster.

I have already tried (without success):

$ kubectl get nodes --insecure-skip-tls-verify=false

What can I do?

Jakub
  • 21
  • 3

1 Answers1

0

The default value of the --insecure-skip-tls-verify is false. Getting rid of the option flag restores the default behavior of TLS certificate verification. You can simply use the following command:

kubectl get nodes

Run the following command to check if TLS verification is being used:

kubectl config view

Verify that the cluster entry points to the correct cluster. Check if the certificate-authority-data field is present, it indicates that TLS verification is being used. The certificate data are omitted, to inspect the certificates display the complete Kubernetes configuration:

cat ~/.kube/config

Now, you can see and optionally verify (with openssl command) the certificates.