-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
clusterctl get kubeconfig results in faulty kubeconfig file after switching to Docker Desktop #6595
Comments
If I understood correctly you got
when using Then there is something wrong with the kubectl call. Otherwise it would use |
/kind support |
Hey @sbueringer thanks for answering. I retried the setup and came to the conclusion I must have copied the wrong command line output (it was getting pretty crammed after all my trials). Thanks for your understanding. I have updated the original issue message, the error output is as follows: |
Is the cluster entirely reconciled? What does |
Hey @sbueringer I'm going to switch back to Docker on the CLI as Docker Desktop uses a VM which impacts performance, so the time to test this setup will be limited. To come back to your questions:
clusterctl describe cluster result (Click to expand)Name: master-cluster
Namespace: default
Labels: <none>
Annotations: <none>
API Version: cluster.x-k8s.io/v1beta1
Kind: Cluster
Metadata:
Creation Timestamp: 2022-06-07T17:44:02Z
Finalizers:
cluster.cluster.x-k8s.io
Generation: 2
Managed Fields:
API Version: cluster.x-k8s.io/v1beta1
Fields Type: FieldsV1
fieldsV1:
f:status:
.:
f:conditions:
f:controlPlaneReady:
f:infrastructureReady:
f:observedGeneration:
f:phase:
Manager: manager
Operation: Update
Subresource: status
Time: 2022-06-07T17:42:56Z
API Version: cluster.x-k8s.io/v1beta1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.:
f:kubectl.kubernetes.io/last-applied-configuration:
f:finalizers:
.:
v:"cluster.cluster.x-k8s.io":
f:spec:
.:
f:clusterNetwork:
.:
f:pods:
.:
f:cidrBlocks:
f:serviceDomain:
f:services:
.:
f:cidrBlocks:
f:controlPlaneEndpoint:
.:
f:host:
f:port:
f:controlPlaneRef:
.:
f:apiVersion:
f:kind:
f:name:
f:namespace:
f:infrastructureRef:
.:
f:apiVersion:
f:kind:
f:name:
f:namespace:
f:paused:
Manager: clusterctl
Operation: Update
Time: 2022-06-07T17:44:02Z
Resource Version: 1442
UID: 73e25d98-7f39-48a7-a8be-5d763aaffa8c
Spec:
Cluster Network:
Pods:
Cidr Blocks:
192.168.0.0/16
Service Domain: cluster.local
Services:
Cidr Blocks:
10.128.0.0/12
Control Plane Endpoint:
Host: 172.18.0.3
Port: 6443
Control Plane Ref:
API Version: controlplane.cluster.x-k8s.io/v1beta1
Kind: KubeadmControlPlane
Name: master-cluster-control-plane
Namespace: default
Infrastructure Ref:
API Version: infrastructure.cluster.x-k8s.io/v1beta1
Kind: DockerCluster
Name: master-cluster
Namespace: default
Status:
Conditions:
Last Transition Time: 2022-06-07T17:44:19Z
Status: True
Type: Ready
Last Transition Time: 2022-06-07T17:44:19Z
Status: True
Type: ControlPlaneInitialized
Last Transition Time: 2022-06-07T17:44:19Z
Status: True
Type: ControlPlaneReady
Last Transition Time: 2022-06-07T17:44:15Z
Status: True
Type: InfrastructureReady
Control Plane Ready: true
Infrastructure Ready: true
Observed Generation: 2
Phase: Provisioned
Events: <none>
Somehow switching to Docker Desktop messed up the networking, but only when using the kubeconfig files from |
Okay, cluster looks okay. So looks like someone would have to debug the network :). But yeah I wouldn't use Docker desktop with an additional VM on Linux. |
@RobinDeBock : you could try if the workaround for MacOS+Docker Desktop works in that case: |
Hey @chrischdi that does seem to have fixed the problem, big thanks! Maybe add this somewhere more general for other users? As Docker Desktop can be used on every system |
I think you're the first CAPI user who tried to use CAPD with Docker Desktop on Linux :). P.S. the linked section is already linked from the quickstart, I wouldn't move it. |
What steps did you take and what happened:
clusterctl init
clusterctl get kubeconfig
on the newly created workload clusterUnable to connect to the server: dial tcp 172.18.0.3:6443: connect: no route to host
What did you expect to happen:
That using
clusterctl get kubeconfig
results in a working kubeconfig file.Anything else you would like to add:
clusterctl get kubeconfig
worked correctly before switching to Docker Desktop.kind get kubeconfig
still works.kind-kubeconfig.yaml (Click to expand)
clusterctl get kubeconfig
results in mostly the same kubeconfig file, except from the IP address.clusterctl-kubeconfig.yaml (Click to expand)
Environment:
GitVersion:"v1.1.3"
v0.12.0 go1.17.8 linux/amd64
kubectl version
):GitVersion:"v1.22.3"
v1.22.7
/etc/os-release
):Ubuntu 20.04.4 LTS
20.10.16
/kind bug
/area provider/docker
/area networking
/area clusterctl
The text was updated successfully, but these errors were encountered: