This message was deleted.
# k3s
a
This message was deleted.
m
Hi Team, Please i need your help on figuring out what the problem is for the dns resolution when setting up
k3s
cluster. Here's the detailed information about my cluster machine:
Copy code
lsb_release -a
LSB Version:    core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy
k3s version
Copy code
kubectl version
Client Version: <http://version.Info|version.Info>{Major:"1", Minor:"23", GitVersion:"v1.23.8+k3s2", GitCommit:"fe3cecc219175ea85d7a95ed9e44349d94734bc7", GitTreeState:"clean", BuildDate:"2022-07-06T20:35:20Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: <http://version.Info|version.Info>{Major:"1", Minor:"23", GitVersion:"v1.23.8+k3s2", GitCommit:"fe3cecc219175ea85d7a95ed9e44349d94734bc7", GitTreeState:"clean", BuildDate:"2022-07-06T20:35:20Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
Command to install and setup k3s
Copy code
curl -sfL <https://get.k3s.io> | INSTALL_K3S_EXEC="server --cluster-init --tls-san $(hostname) --bind-address=${current_ip} --advertise-address=${current_ip} --node-ip=${current_ip} --write-kubeconfig-mode 644 --flannel-iface=eth0 --node-external-ip=${current_ip}" INSTALL_K3S_VERSION="v1.23.8+k3s2" sh -s -
After running this command i get the following objects created and running
Copy code
kubectl get all -A
NAMESPACE     NAME                                          READY   STATUS      RESTARTS   AGE
kube-system   pod/coredns-d76bd69b-t48vp                    1/1     Running     0          10m
kube-system   pod/helm-install-traefik-crd-p75nj            0/1     Completed   0          10m
kube-system   pod/helm-install-traefik-q2g6d                0/1     Completed   1          10m
kube-system   pod/local-path-provisioner-6c79684f77-dgrw8   1/1     Running     0          10m
kube-system   pod/metrics-server-7cd5fcb6b7-dmkfm           1/1     Running     0          10m
kube-system   pod/svclb-traefik-8cdc35c6-kgqd9              2/2     Running     0          9m54s
kube-system   pod/traefik-df4ff85d6-lf2mb                   1/1     Running     0          9m54s

NAMESPACE     NAME                     TYPE           CLUSTER-IP      EXTERNAL-IP    PORT(S)                      AGE
default       service/kubernetes       ClusterIP      10.43.0.1       <none>         443/TCP                      10m
kube-system   service/kube-dns         ClusterIP      10.43.0.10      <none>         53/UDP,53/TCP,9153/TCP       10m
kube-system   service/metrics-server   ClusterIP      10.43.213.20    <none>         443/TCP                      10m
kube-system   service/traefik          LoadBalancer   10.43.108.209   192.168.1.27   80:31811/TCP,443:30979/TCP   9m54s

NAMESPACE     NAME                                    DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
kube-system   daemonset.apps/svclb-traefik-8cdc35c6   1         1         1       1            1           <none>          9m54s

NAMESPACE     NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE
kube-system   deployment.apps/coredns                  1/1     1            1           10m
kube-system   deployment.apps/local-path-provisioner   1/1     1            1           10m
kube-system   deployment.apps/metrics-server           1/1     1            1           10m
kube-system   deployment.apps/traefik                  1/1     1            1           9m54s

NAMESPACE     NAME                                                DESIRED   CURRENT   READY   AGE
kube-system   replicaset.apps/coredns-d76bd69b                    1         1         1       10m
kube-system   replicaset.apps/local-path-provisioner-6c79684f77   1         1         1       10m
kube-system   replicaset.apps/metrics-server-7cd5fcb6b7           1         1         1       10m
kube-system   replicaset.apps/traefik-df4ff85d6                   1         1         1       9m54s

NAMESPACE     NAME                                 COMPLETIONS   DURATION   AGE
kube-system   job.batch/helm-install-traefik       1/1           20s        10m
kube-system   job.batch/helm-install-traefik-crd   1/1           18s        10m
Here's what I noticed, 1. The
flannel service/deamonset
wasn't created even though i have specified it in the Install command. The first question I have is that, will this have any effect on how the cluster works !!!!!! Moving on, think i have a problem with the dns and when I check the logs for the
CoreDNS
pod i see this error message
Copy code
kubectl logs coredns-d76bd69b-t48vp -n kube-system
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
.:53
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
[INFO] plugin/reload: Running configuration SHA512 = b941b080e5322f6519009bb49349462c7ddb6317425b0f6a83e5451175b720703949e3f3b454a24e77f3ffe57fd5e9c6130e528a5a1dd00d9000e4afd6c1108d
CoreDNS-1.9.1
linux/amd64, go1.17.8, 4b597f8
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
[WARNING] No files matching import glob pattern: /etc/coredns/custom/*.server
........
My questions here are 1. do i need to create this directory on my linux box a. also, do i need to create this in all the linux box i will be using in the cluster, that-is all master and worker nodes? 2. are there any prerequisite that i need to complete before i can use coredns in my cluster To confirm i have a problem with my dns i tried pinging ip and hostname of the
traefik
pods. Pinging the ip works but not the hostname
Copy code
PINGING the IP
ping 10.42.0.8
PING 10.42.0.8 (10.42.0.8) 56(84) bytes of data.
64 bytes from 10.42.0.8: icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from 10.42.0.8: icmp_seq=2 ttl=64 time=0.052 ms
....
^C
--- 10.42.0.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2039ms
rtt min/avg/max/mdev = 0.034/0.044/0.052/0.007 ms

PINGING THE Hostname
ping traefik-df4ff85d6-lf2mb
ping: traefik-df4ff85d6-lf2mb: Temporary failure in name resolution
Here's where the major question is 1. What exactly does the error message means a.
ping: traefik-df4ff85d6-lf2mb: Temporary failure in name resolution
Does anyone have any idea what i am doing wrong?
Also, i tried creating a test pod and when i ping the ip of that pod it works, but when i ping the hostname i get the same error