Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for invalid K8S-API EP certs #769

Open
crkurz opened this issue Dec 16, 2024 · 0 comments
Open

No support for invalid K8S-API EP certs #769

crkurz opened this issue Dec 16, 2024 · 0 comments

Comments

@crkurz
Copy link

crkurz commented Dec 16, 2024

What happened?

In case a K8S cluster EP has invalid certifications, kubectl allows adding insecure-skip-tls-verify: true as shown below:

clusters:
  - name: cluster-abc
    cluster:
      server: https://...:6443
      insecure-skip-tls-verify: true

Gefyra currently ignores this information.

More general: how to handle any other additional config info? (if possible)

What did you expect to happen?

Gefyra should honour insecure-skip-tls-verify: true in Gefyra Client.

Please provide the output of gefyra check.

.

How can we reproduce it (as minimally and precisely as possible)?

.

What Kubernetes setup are you working with?

$ kubectl version
# paste output here

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Anything else we need to know?

Work-around: patch Gefyra client

Patch needed in configuration.py: ClientConfiguration._init_kubeapi().

  self.K8S_APP_API = AppsV1Api()
  self.K8S_APP_API.api_client.configuration.verify_ssl = False       <--- addition needed in case cluster is configured with insecure-skip-tls-verify:true

The second change needed: local/utils.py: compose_kubeconfig_for_serviceaccount():

clusters:
  - name: default-cluster
    cluster:
      certificate-authority-data: {ca}
      server: {server}
      insecure-skip-tls-verify: true          <---- addition needed in case cluster is configured with insecure-skip-tls-verify:true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant