-
-
Notifications
You must be signed in to change notification settings - Fork 466
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] Can't connect to k3s from outside network #36
Comments
Hey @minhnguyenvato, can you post the command you used to create the cluster and the resulting kubeconfig here please? |
k3d command kubeconfig
|
So that's the kubeconfig that you've got via |
Does it work for you if you just do |
I copy the cluster, context, user from , that's the kubeconfig. Then using kubectx to switch to that context. |
I've replace |
Ah, sorry, I totally misunderstood you and didn't get that you were running k3d on a remote server.
There might be other options such as changing the server bind address, but I didn't test those. Does this solve your issue? |
Thank you very much . Option 2 is works for me . |
@minhnguyenvan95 not sure if |
@iwilltry42 you just made my day. Crazy demo incoming (on twitter 😉) |
thanks sir |
I see the solution changed since the CLI changed, I tried to put in k3d config: ...
options:
...
k3s: # options passed on to K3s itself
extraArgs: # additional arguments pasised to the `k3s server|agent` command; same as `--k3s-arg`
- arg: --tls-san="MY_EXTERNAL_IP" With this, the error still shows, so for now I use EDIT: nevermind, somehow the error is gone, so for the newcomer, what I wrote is the solution on latest k3d Update (@iwilltry42): Here's the CLI way in k3d v5: |
As I have tested, it should work when expanding the quotes.
|
After change my ~/.kube/config to k3s generated certificate
Then I run
kubectl get pod
and received this error messageUnable to connect to the server: x509: certificate is valid for 127.0.0.1, 172.18.0.2, not 192.168.1.200
The text was updated successfully, but these errors were encountered: