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] Unable to create a cluster without CoreDNS #912

Closed
kevinpollet opened this issue Dec 29, 2021 · 2 comments · Fixed by #955
Closed

[BUG] Unable to create a cluster without CoreDNS #912

kevinpollet opened this issue Dec 29, 2021 · 2 comments · Fixed by #955
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kevinpollet
Copy link

What did you do

Tried to create a k3d cluster without CoreDNS to do some testing with KubeDNS. The cluster was created with the following command: k3d cluster create --k3s-arg --disable=coredns@server:0.

Because of the missing CoreDNS deployment, the Host IP injection failed. As the --no-hostip flag has been removed in v5, it is not possible to create a k3d cluster without CoreDNS anymore.

What did you expect to happen

The k3d cluster should be created/started without coredns installed.

Screenshots or terminal output

❯ k3d cluster create --k3s-arg --disable=coredns@server:0
INFO[0000] Prep: Network
INFO[0000] Created network 'k3d-k3s-default'
INFO[0000] Created volume 'k3d-k3s-default-images'
INFO[0000] Starting new tools node...
INFO[0000] Starting Node 'k3d-k3s-default-tools'
INFO[0001] Creating node 'k3d-k3s-default-server-0'
INFO[0003] Pulling image 'docker.io/rancher/k3s:v1.21.7-k3s1'
INFO[0011] Creating LoadBalancer 'k3d-k3s-default-serverlb'
INFO[0011] Using the k3d-tools node to gather environment information
INFO[0012] Starting cluster 'k3s-default'
INFO[0012] Starting servers...
INFO[0012] Starting Node 'k3d-k3s-default-server-0'
INFO[0017] All agents already running.
INFO[0017] Starting helpers...
INFO[0017] Starting Node 'k3d-k3s-default-serverlb'
INFO[0024] Injecting '192.168.65.2 host.k3d.internal' into /etc/hosts of all nodes...
INFO[0024] Injecting records for host.k3d.internal and for 2 network members into CoreDNS configmap...
ERRO[0024] Failed Cluster Start: error during post-start cluster preparation: runtime failed to read '/var/lib/rancher/k3s/server/manifests/coredns.yaml' from node 'k3d-k3s-default-server-0': Error: No such container:path: b2b3405ae780b81ec2106d7fe8d1c3edd640724a176fb8b19d641807d7f4ae49:/var/lib/rancher/k3s/server/manifests/coredns.yaml: file not found
ERRO[0024] Failed to create cluster >>> Rolling Back
INFO[0024] Deleting cluster 'k3s-default'
INFO[0025] Deleting cluster network 'k3d-k3s-default'
INFO[0025] Deleting image volume 'k3d-k3s-default-images'
FATA[0025] Cluster creation FAILED, all changes have been rolled back!

Which OS & Architecture

  • MacOs / amd64

Which version of k3d

k3d version v5.2.2
k3s version v1.21.7-k3s1 (default)

Which version of docker

Client:
 Cloud integration: v1.0.22
 Version:           20.10.11
 API version:       1.41
 Go version:        go1.16.10
 Git commit:        dea9396
 Built:             Thu Nov 18 00:36:09 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.11
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.9
  Git commit:       847da18
  Built:            Thu Nov 18 00:35:39 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
@kevinpollet kevinpollet added the bug Something isn't working label Dec 29, 2021
@iwilltry42 iwilltry42 added this to the v5.3.0 milestone Jan 5, 2022
@iwilltry42
Copy link
Member

Hi @kevinpollet , thanks for opening this issue!
You're right, that k3d is currently depending on the default CoreDNS deployment and should be able to gracefully handle the case where it's disabled. It's on the roadmap 👍

@iwilltry42
Copy link
Member

Release containing this fix will be out later today 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants