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

The UI does not display custom Kubeconfig files #8147

Open
GorSarg opened this issue Dec 20, 2024 · 5 comments
Open

The UI does not display custom Kubeconfig files #8147

GorSarg opened this issue Dec 20, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@GorSarg
Copy link

GorSarg commented Dec 20, 2024

Describe the bug
Lens only shows kubecontexts from the ~/.kube/config file, ignoring other .yaml kubeconfig files in the ~/.kube/ directory. Even though the SYNCED ITEMS path is set to ~/.kube/, kubecontexts from additional .yaml files are not being displayed in the "Local Kubeconfigs" section.

Reproduce
Steps to reproduce the behavior:

Open Lens and go to the "Manage Kubeconfigs" section.
Confirm that the SYNCED ITEMS path is set to ~/.kube/.
Place multiple valid kubeconfig .yaml files in the ~/.kube/ directory (besides ~/.kube/config).
Open Lens and check the kubecontexts listed under "Local Kubeconfigs."
Observe that only kubecontexts from ~/.kube/config are displayed, while other .yaml files are ignored.

Expected behavior
Lens should display kubecontexts from all valid .yaml kubeconfig files in the ~/.kube/ directory, not just those from ~/.kube/config.

Environment (please complete the following information):

Lens Version: November 28, 2024
OS: macOS

Additional context
This issue started occurring after the most recent Lens upgrade. Previously, kubecontexts from all valid .yaml kubeconfig files in the ~/.kube/ directory were detected correctly.

@GorSarg GorSarg added the bug Something isn't working label Dec 20, 2024
@GorSarg
Copy link
Author

GorSarg commented Dec 20, 2024

I also noticed the lens could not show the config files related to the AWS EKS. All yaml files are from the EKS. configs look like

apiVersion: v1
preferences: {}
kind: Config

clusters:

  • cluster:
    server: xxxx
    certificate-authority-data: xxx==
    name: xxx

contexts:

  • context:
    cluster: xxx
    user: xxx
    namespace: default
    name: xxx

current-context: xxx

users:

  • name: xxx
    user:
    exec:
    apiVersion: client.authentication.k8s.io/v1alpha1
    command: aws
    args:
    - "eks"
    - "get-token"
    - "--profile"
    - "xxx"
    - "--cluster-name"
    - "xxx"

@GorSarg
Copy link
Author

GorSarg commented Dec 20, 2024

2024-12-20T08:11:39.990Z debug: [KUBECONFIG-SYNC]: context failed validation: Error: kubeconfigs created for kubernetes older than v1.24 are no longer supported (for context 'eu-prod').

@panuhorsmalahti
Copy link
Contributor

The EKS clusters are not visible because of apiVersion: client.authentication.k8s.io/v1alpha1. Please re-generate the kubeconfigs for EKS after updaing the AWS CLI tool.

@GorSarg
Copy link
Author

GorSarg commented Dec 20, 2024

thanks. it helped

@geoffmaggi
Copy link

Thanks @panuhorsmalahti, had the same issue and that resolved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants