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

clusterctl get kubeconfig results in faulty kubeconfig file after switching to Docker Desktop #6595

Closed
RobinDeBock opened this issue Jun 5, 2022 · 9 comments
Labels
area/clusterctl Issues or PRs related to clusterctl area/networking Issues or PRs related to networking kind/support Categorizes issue or PR as a support question. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@RobinDeBock
Copy link
Contributor

RobinDeBock commented Jun 5, 2022

What steps did you take and what happened:

  • Removed docker from system
  • Clean install of Docker Desktop
  • Created a bootstap cluster with Kind
  • Created a workload cluster with clusterctl init
  • Used clusterctl get kubeconfig on the newly created workload cluster
  • Using this kubeconfig file to connect to the cluster results in
    Unable 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.
  • Using kind get kubeconfig still works.
kind-kubeconfig.yaml (Click to expand)
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM2akNDQWRLZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1EWXdOakV5TWpZME0xb1hEVE15TURZd016RXlNekUwTTFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBT1ZoCnZHczlmMnU0OC9XZ2gzR0toZU82bCtMTkVDeXNVYk02YzBFcmhvY2s3c0NZYmhJRndlSFZvaFhxeXFDc2ROd0UKdjdDbWp3SFd4cm1tTTJFMm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luster: kind-master-cluster
    user: kind-master-cluster
  name: kind-master-cluster
current-context: kind-master-cluster
kind: Config
preferences: {}
users:
- name: kind-master-cluster
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lJUW5zZHJrSWV4a0l3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TWpBMk1EWXhNakkyTkROYUZ3MHlNekEyTURZeE1qTXlNREphTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTVBYnJjMFI5dHFtQk0zVDYKaDBRbUcvZTFEM2E0N0NPd1hVYjlvenNqREtwVkkxNHV0c0ovT2IyQ0krTnNwUXY1ZWlUWm14a0Q4aGN4aUQyRwpCcE5yK1pyMGtyaE5MT010Q3p2UnlEdUlRU2NqbjFVcUNXd1BzSTUyVnQ2K1dVcEpjeCtVdUZkWFEvV1BtM2M4Cmp2Yi8zUGowZ3IyaDRoQ3U3L0hOMERZVGMzTGVqM0N6NkpnendTYUxxSDJHTDM1eGw2ZEQyMUlkckxLZjdOSlYKd3ZpVHU5TlVJdUtleE5YNEk4T1B4K1ROVXlHeEdUZVZFNGUzSWs4QVBlZjdLYmhEcFk0UXpxK0hjd2ltR1I2bgpUWmVic3FvNXBWd3BFdGRBQjZnNEVWUGdoMlcxbldIMEhVc08ySGk0MU9oWmZTeUVUc0VzM0tVSzd2QjF3aS9iCkpOYWQwd0lEQVFBQm8xWXdWREFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0RBWURWUjBUQVFIL0JBSXdBREFmQmdOVkhTTUVHREFXZ0JSL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EFOOEc2djJZUGU3MFZGL3UxQ1pRcGdtSEdGRmUwZ2M3MWhBTGphU3ZRYXlOegpnMXVaUWRtZFFDOEpkUW42dWM3RVBxOVcxczVKOVdSTktpUnhVbzdIeWZXWnVnM1llMWJpUlJPZHFQS1ozS2V3Cnd3ek9Za2ZtUy9CM1VHTEVxRWRPMWxkNUFvR0JBSUZKRUlsejdSekZZZUJuK0VrYWx1OTc1UXNxU1ExeE1jOEgKMjVpbG83ZEFwd0JzMWVhdUNjZWlWWlRtTVhva2xKUXRBaXdQUGFRWlozM3FpQXhWS0E0b2ZxejRIMGxWRVgwWgoweDFRZ0h2elhzVmszYmlBdS9uWXBiSTVsMndEczROZnI4eUpUaTd2RkVOTHhyOVpNb1VGRHpBZWk5WXJiYU54CmU4K2F2Y2JoQW9HQkFNR1ZRUVFmYTErTVBaQ08zR3F3SXAvbTJpWGZCSHVsY0lLcHN4WGllTmJ6ZGRhdkUwSHMKNEUrUzBGbUN2SEIvUTM3OVZ2aUtpYnF6RThQeFA4aUlEbWdMajVpa29NN0xrTkdhRTFaM1NmQnJuK3VIV0dSKwpKM1I2RXFVZVdaRm1JWk5GNU9KTmhRWE9VakJ5ZnZVdDFhYWJ5TDlpYTF1UDVCSVkyQjdnekpvMgotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
  • Using clusterctl get kubeconfigresults in mostly the same kubeconfig file, except from the IP address.
clusterctl-kubeconfig.yaml (Click to expand)
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM2akNDQWRLZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1EWXdOakV5TWpZME0xb1hEVE15TURZd016RXlNekUwTTFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2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2c28rMitTWHBlV2pjCkl6b2wzdW1WUnlpU0dLTTFYeGlDSHpOcGFQWEVhQkNGMThjVDBKTmUKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    server: https://172.18.0.3:6443
  name: master-cluster
contexts:
- context:
    cluster: master-cluster
    user: master-cluster-admin
  name: master-cluster-admin@master-cluster
current-context: master-cluster-admin@master-cluster
kind: Config
preferences: {}
users:
- name: master-cluster-admin
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURFekNDQWZ1Z0F3SUJBZ0lJUTFkb1BqN3d0Vkl3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TWpBMk1EWXhNakkyTkROYUZ3MHlNekEyTURZeE1qTXhORFJhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXk1cW1iWXFwVmt4QUFBQ0oKM2xzVjVxaEs1ays3Z3o2V09zUE9TSkJIMDhRSFE5by84SDZ5V0FqQzBxRjB6cFYxOU1sQVRRWWgwcVpBV25SNgpETGM1YnpPcGF0eEpybVFRNnFKMG5Nam9qV0V3ZzcrNHd5eVp4SGlDblZJbERIaERyVkhzYzNkS0ozdmVRK0p2ClJFdmxvZjZPRnF3WFNtY2RMc2lhL3RDeUlPaEpZQ25aS2U1MmhDWnFCNEJlbk5oQTljanRJY0JDVDFpY3RxTjkKUTNhcnpaOS81Rm0xc2YvcEtKeWpRcXRSV016dDFMbGNUNTdNM3NZYnpRNU0yMzVOL0gyZS9TVXFmZ1NiWkFwNgo2eWVUdlgxQlhYSFBuZUdkOWtxRmdTNnhEZ2xUNXkxcUpKM0tyWVZybjV0OCtmQ0o4N2tXQ0V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dQWGo2NlNBQnd4YlNWcDVOCk9HblhjY24wNnM0bTZiR2wzTXZ2cnUyWXJrRHNYWFg0SVRiL0ErS3RBb0dBV1NrbmRrN3pvNlE1UDEzVTlScmgKYXVWSzZqWExZMjhNci82SDhsaGNsRUtlU3QyS0haWHlmcHlCd2t4UTN5NjFTRS9ZYm5NR0IzYkZPRjhPYi9GSwpQK2JpRVg0d2J1d0o4ZG9SOFU1cGJtUit2TmVDNzAxdGZIWitSdHdZR2J3UFgxNk11dmhYcjg1ZEtsNnhURnFWCjBtSEFmelFLUkNlMHUweTBMZ0tsakxzQ2dZQlFPQWZJSDY0TXFjbFZmeGwrWlR5THRzNExsRG1iM0tvamdwMGMKZ1dZQjA4WEFIOE00Uk5FZFhjTzJUN3RsdlJWNmRFWS9tSmM4RzBKSU9KeVB6MkdRZGp1TzJsdXAyWDFBTko4OAp5di96RnphSkF2UkNCS2s1SDZxZFJlelFneGpqOFl2dTVLeGtFUFFrTFNuNnNPYVRBdG43ZnBGZHE0SUdCRHhKCjUxZ0l0UUtCZ1FDdU1xRi91YTYzTWFEQ1VRWGovZmhZVy9yeTBib2lJdGkwTW9CbmJ0cCs4N2p2SW5jM3RqeDAKYlU2d1NRczBQMm50dklVbk41ZHhyZkI0dmlyTlkrc0NXVFV4Z0E2cStnUTVMOEVHaE5wNnRmeExMVmNZQ0J5NwpFak9ta0hSWEd5cG04cXpheUZpdXJCN0wxaHRtdU1ZOGtxcmhXSzhHOWNKMGkvZWZCdjZrTVE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
- In the period of me using setting up the cluster (using `clusterctl get kubeconfig`) and switching to Docker Desktop, an update has been available to clusterctl. I have not installed this one yet and would like to stay on this version if possible.

Environment:

  • Cluster-api version: GitVersion:"v1.1.3"
  • Minikube/KIND version: v0.12.0 go1.17.8 linux/amd64
  • Kubernetes version: (use kubectl version):
    • Client: GitVersion:"v1.22.3"
    • Server, both Kind cluster and workload cluster have version v1.22.7
  • OS (e.g. from /etc/os-release): Ubuntu 20.04.4 LTS
  • Docker Desktop: 20.10.16

/kind bug
/area provider/docker
/area networking
/area clusterctl

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/provider/docker area/networking Issues or PRs related to networking area/clusterctl Issues or PRs related to clusterctl labels Jun 5, 2022
@sbueringer
Copy link
Member

If I understood correctly you got

The connection to the server localhost:8080 was refused - did you specify the right host or port?

when using clusterctl-kubeconfig.yaml ?

Then there is something wrong with the kubectl call. Otherwise it would use https://172.18.0.3:6443 and not the default server URL.

@fabriziopandini
Copy link
Member

/kind support
/remove-kind bug
/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added kind/support Categorizes issue or PR as a support question. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed kind/bug Categorizes issue or PR as related to a bug. labels Jun 6, 2022
@RobinDeBock
Copy link
Contributor Author

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: Unable to connect to the server: dial tcp 172.18.0.3:6443: connect: no route to host

@sbueringer
Copy link
Member

Is the cluster entirely reconciled? What does clusterctl describe cluster show? Any recurring errors in controller logs?

@RobinDeBock
Copy link
Contributor Author

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:

Is the cluster entirely reconciled?
The cluster is fully operational. As described before, this is the exact same cluster that I was using before. The only difference is that the IP address in the kubeconfig file resulting from clusterctl get kubeconfig is different from the one from kind get kubeconfig and the first one can't be used ot communicate with the cluster. Everything else is working fine.

What does clusterctl describe cluster show?

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>

Any recurring errors in controller logs?
No errors found as the whole clusters seems to be running fine.

Somehow switching to Docker Desktop messed up the networking, but only when using the kubeconfig files from clusterctl get kubeconfig

@sbueringer
Copy link
Member

sbueringer commented Jun 8, 2022

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.

@chrischdi
Copy link
Member

@RobinDeBock : you could try if the workaround for MacOS+Docker Desktop works in that case:

Fix kubeconfig (when using docker on MacOS)

@RobinDeBock
Copy link
Contributor Author

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

@sbueringer
Copy link
Member

sbueringer commented Jun 8, 2022

I think you're the first CAPI user who tried to use CAPD with Docker Desktop on Linux :).
But yeah feel free to open a PR to make the comment a bit more generic.

P.S. the linked section is already linked from the quickstart, I wouldn't move it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterctl Issues or PRs related to clusterctl area/networking Issues or PRs related to networking kind/support Categorizes issue or PR as a support question. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

5 participants