Skip to content

ExecCredentialSpec.Cluster. config is missing #2395

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

Open
wkloucek opened this issue May 14, 2025 · 0 comments · May be fixed by #2396
Open

ExecCredentialSpec.Cluster. config is missing #2395

wkloucek opened this issue May 14, 2025 · 0 comments · May be fixed by #2396
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@wkloucek
Copy link

wkloucek commented May 14, 2025

What happened (please include outputs or screenshots):

#2298 / #2303 implemented the provideClusterInfo.

It misses this part (from https://kubernetes.io/docs/reference/config-api/client-authentication.v1/#client-authentication-k8s-io-v1-Cluster):

Config holds additional config data that is specific to the exec plugin with regards to the cluster being authenticated to.

This data is sourced from the clientcmd Cluster object's extensions[client.authentication.k8s.io/exec] field:
...
...

What you expected to happen:

client.authentication.k8s.io/exec extension is set to ExecCredentialSpec.Cluster.config so that gardenlogin can use it

How to reproduce it (as minimally and precisely as possible):

Unfortunately I only know how to reproduce it with a Gardener Kubernetes setup.

Setup the KUBECONFIG environment:

Then run following script:

from kubernetes import client, config

# Configs can be set in Configuration class directly or using helper utility
config.load_kube_config()

v1 = client.CoreV1Api()
print("Listing pods with their IPs:")
ret = v1.list_namespaced_pod(namespace="default", watch=False)
for i in ret.items:
    print("%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name))

You'll get an error:

'ERROR:root:exec: process returned 1. Error: name must be specified. Hint: update kubectl in case you are using a version older than v1.20.0
Usage:
  gardenlogin get-client-certificate [flags
]

Flags:
...

Anything else we need to know?:

Environment:

  • Kubernetes version (kubectl version):
  • OS (e.g., MacOS 10.13.6):
  • Python version (python --version)
  • Python client version (pip list | grep kubernetes)
@wkloucek wkloucek added the kind/bug Categorizes issue or PR as related to a bug. label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant