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

Help adding a remote cluster (minikube) #8155

Open
mickahell opened this issue Jan 5, 2025 · 4 comments
Open

Help adding a remote cluster (minikube) #8155

mickahell opened this issue Jan 5, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@mickahell
Copy link

What would you like to be added:

Hello everyone, very similar to #5385 I have a remote minikube, and I follow this tutorial to be able to access it from local:
https://medium.com/@bsatnam98/access-minikube-cluster-from-another-device-within-the-same-network-9bbd3f06451

I can access the Kubernes api using curl minikube:password@ip:443, and kubectl from terminal works just fine.
However, I can't get Lens working.

I have the latest version of Lens.

When I run on debug I have this error :

info:    ┏ [INTERNAL-PROXY-MAIN]: Connection Update +80ms
info:    ┗ [1] { update: 'Authentication proxy started', clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5' }
info:    ▪ [INTERNAL-PROXY-MAIN]: Port 53775 is being used for clusterId="7e61cb033a7c2904df8e2e0f1d87b7d5" kube auth proxy +2ms
info:    ┏ [INTERNAL-PROXY-MAIN]: Connection Update +0ms
info:    ┗ [1] { update: 'Refreshing connection status ...', clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5' }
error:   ▪ [CLUSTER-MANAGER-MAIN]: Failed to connect to clusterId="7e61cb033a7c2904df8e2e0f1d87b7d5": SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON +29ms
error:   ┏ [INTERNAL-PROXY-MAIN]: Connection Update +0ms
error:   ┃ [1] {
error:   ┃ [2]   update: `Unexpected token '<', "<!doctype "... is not valid JSON`,
error:   ┃ [3]   clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5'
error:   ┗ [4] }

I don't find anything about how pass this error :/

Here my nginx file :

events {
    worker_connections 1024;
}
http {
  server_tokens off;
  auth_basic "Administrator’s Area";
  auth_basic_user_file /etc/nginx/.htpasswd;
  server {
    listen 443;
    server_name minikube;
    location / {
      proxy_set_header X-Forwarded-For $remote_addr;
      proxy_set_header Host            $http_host;
      proxy_pass https://minikube:8443;
      proxy_ssl_certificate /etc/nginx/certs/minikube-client.crt;
      proxy_ssl_certificate_key /etc/nginx/certs/minikube-client.key;
    }
  }
}

Why is this needed:

Environment you are Lens application on:

  • Kubernetes distribution: minikube
  • Desktop OS: MacOS

Thanks for your help :)

@mickahell mickahell added the enhancement New feature or request label Jan 5, 2025
@Christiaanvdl
Copy link

Hello @mickahell , Thank you for reaching out! I have contacted our development team regarding your issue .

@panuhorsmalahti
Copy link
Contributor

Can you see if the request is reaching nginx? If not, that HTML response is probably coming from Lens for some reason.

@mickahell
Copy link
Author

I don't know, here the entire logs from Lens when I tried to connect it :

info:    ┏ [CLUSTER-MANAGER-MAIN]: Ensuring cluster connection is active +10s
info:    ┗ [1] { clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5', connectionStatus: 'disconnected' }
info:    ┏ [INTERNAL-PROXY-MAIN]: Connection Update +0ms
info:    ┗ [1] { update: 'Starting connection ...', clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5' }
info:    ┏ [INTERNAL-PROXY-MAIN]: Connection Update +585ms
info:    ┗ [1] { update: 'Authentication proxy started', clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5' }
info:    ▪ [INTERNAL-PROXY-MAIN]: Port 61057 is being used for clusterId="7e61cb033a7c2904df8e2e0f1d87b7d5" kube auth proxy +1ms
info:    ┏ [INTERNAL-PROXY-MAIN]: Connection Update +1ms
info:    ┗ [1] { update: 'Refreshing connection status ...', clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5' }
error:   ▪ [CLUSTER-MANAGER-MAIN]: Failed to connect to clusterId="7e61cb033a7c2904df8e2e0f1d87b7d5": SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON +43ms
error:   ┏ [INTERNAL-PROXY-MAIN]: Connection Update +0ms
error:   ┃ [1] {
error:   ┃ [2]   update: `Unexpected token '<', "<!doctype "... is not valid JSON`,
error:   ┃ [3]   clusterId: '7e61cb033a7c2904df8e2e0f1d87b7d5'
error:   ┗ [4] }

I'm guessing the request reach well nginx as the cmd kubectl are working from terminal

@panuhorsmalahti
Copy link
Contributor

Can you look at the logs of the nginx container to see if the request reaches it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants