You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
k0sctl kubeconfig command on 0.18.0 generates a kubeconfig file significantly different from
the one generated by previous versions. The file generated by 0.18.0 uses the private IP of the controller node
in the server address, which makes it impossible to use the kubeconfig file to access the cluster from remote machines.
In addition, kubeconfig files generated by 0.18.0 ignore the cluster name in k0sctl.yaml file and
use Default as the context name while previous versions used the cluster name as the context name.
Steps to reproduce
Deploy a k0s cluster with k0sctl (either 0.17.x or 0.18.0).
Using k0sctl 0.18.0, generate a kubeconfig file with k0sctl kubeconfig.
Expected behavior
The resulting kubeconfig file should use the public IP of the controller node to be able to connect to the cluster
from remote machines.
The resulting kubeconfig file uses context with the name equal to the cluster name in k0sctl.yamlmetadata.name.
Actual behavior
On 0.18.0, the resulting kubeconfig file uses the private IP of the controller node,
which makes it impossible to connect to the cluster from remote machines.
The context name in the kubeconfig file is Default instead of the cluster name in k0sctl.yamlmetadata.name.
Comparison
Below is the k0sctl.yaml file and two kubeconfig files generated by k0sctl kubeconfig command of different k0sctl versions using that k0sctl.yaml.
Description
k0sctl kubeconfig
command on 0.18.0 generates a kubeconfig file significantly different fromthe one generated by previous versions. The file generated by 0.18.0 uses the private IP of the controller node
in the server address, which makes it impossible to use the kubeconfig file to access the cluster from remote machines.
In addition, kubeconfig files generated by 0.18.0 ignore the cluster name in
k0sctl.yaml
file anduse
Default
as the context name while previous versions used the cluster name as the context name.Steps to reproduce
k0sctl kubeconfig
.Expected behavior
from remote machines.
k0sctl.yaml
metadata.name
.Actual behavior
which makes it impossible to connect to the cluster from remote machines.
Default
instead of the cluster name ink0sctl.yaml
metadata.name
.Comparison
Below is the
k0sctl.yaml
file and two kubeconfig files generated byk0sctl kubeconfig
command of different k0sctl versions using thatk0sctl.yaml
.The highlights are:
clusters[0].cluster.server
uses the public IP fromk0sctl.yaml
file on 0.17.4 and the private IP on 0.18.0.clusters[0].name
is equal to themetadata.name
ink0sctl.yaml
file on 0.17.4 andlocal
on 0.18.0.contexts[0].name
is equal to themetadata.name
ink0sctl.yaml
file on 0.17.4 andDefault
on 0.18.0.contexts[0].context.user
isadmin
on 0.17.4 anduser
on 0.18.0The text was updated successfully, but these errors were encountered: