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

[BUG] waiting for k3s is not sufficient #512

Open
k0da opened this issue Feb 24, 2021 · 1 comment
Open

[BUG] waiting for k3s is not sufficient #512

k0da opened this issue Feb 24, 2021 · 1 comment
Assignees
Labels
bug Something isn't working priority/medium
Milestone

Comments

@k0da
Copy link
Contributor

k0da commented Feb 24, 2021

since 4.1.0 k3d waits for k3s to finish startup, but for k8s this is not sufficient as Node is not Ready yet.

IMO k3d should wait for kubelet to be started ("kubelet started" message).

What did you do

  • How was the cluster created?

    • k3d cluster create foo --wait
  • What did you do afterwards?

  • kubectl get no

What did you expect to happen

Node is Ready

Screenshots or terminal output

k3d cluster create foo --wait; kubectl get no
INFO[0000] Prep: Network
INFO[0000] Created network 'k3d-foo'
INFO[0000] Created volume 'k3d-foo-images'
INFO[0001] Creating node 'k3d-foo-server-0'
INFO[0001] Creating LoadBalancer 'k3d-foo-serverlb'
INFO[0001] Starting cluster 'foo'
INFO[0001] Starting servers...
INFO[0001] Starting Node 'k3d-foo-server-0'
INFO[0007] Starting agents...
INFO[0007] Starting helpers...
INFO[0007] Starting Node 'k3d-foo-serverlb'
INFO[0009] (Optional) Trying to get IP of the docker host and inject it into the cluster as 'host.k3d.internal' for easy access
INFO[0011] Successfully added host record to /etc/hosts in 2/2 nodes and to the CoreDNS ConfigMap
INFO[0011] Cluster 'foo' created successfully!
INFO[0011] --kubeconfig-update-default=false --> sets --kubeconfig-switch-context=false
INFO[0011] You can now use it like this:
kubectl config use-context k3d-foo
kubectl cluster-info
NAME               STATUS     ROLES                  AGE   VERSION
k3d-foo-server-0   NotReady   control-plane,master   5s    v1.20.2 k3s1

Which OS & Architecture

  • MacOS

Which version of k3d

  • k3d version v4.2.0
    k3s version latest (default)

Which version of docker

  • output of docker version and docker info
    20.10.2
@iwilltry42
Copy link
Member

Hi @k0da , k3s waits for as long as it takes for the API-Server to be up and running, i.e. making the cluster responsive for further usage.
Basically, then the cluster can be used with kubectl already to modify it in early stages.
In a first test though it seems like there are just a few seconds between those two log lines (around 3 seconds in my case).
The log lines we could alternatively wait for are Started kubelet or even Successfully registered node.

@iwilltry42 iwilltry42 modified the milestones: Backlog, v4.3.0 Mar 2, 2021
@iwilltry42 iwilltry42 modified the milestones: v4.3.0, v4.4.0 Mar 10, 2021
@iwilltry42 iwilltry42 modified the milestones: v4.4.5, Backlog Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/medium
Projects
None yet
Development

No branches or pull requests

2 participants