-
Notifications
You must be signed in to change notification settings - Fork 557
Description
When using var k8sApi = k8s.Config.defaultClient();
to get the default client, if the users .kube/config
file includes a context with insecure-skip-tls-verify
the certificate-authority
is not necessarily going to be present. See example below:
- cluster:
insecure-skip-tls-verify: true
server: https://127.0.0.1:443
name: my-cluster
In these cases the call to defaultClient()
fails with the following error:
Uncaught Error: clusters[0].cluster.[certificate-authority-data, certificate-authority] is missing
This is trigged by Config Types validation code which tests for a certificate authority even if insecure-skip-tls-verify
is set to true. Source
This prevents using this library even if the currently set context does provide a context-authority
since all context configurations are validated during the iteration.
I would like to be able to connect to some clusters using the insecure flag.