microk8s icon indicating copy to clipboard operation
microk8s copied to clipboard

DNS Issues

Open AlexWeinstein92 opened this issue 1 year ago • 24 comments

Summary

Ultimately my goal is to let my pods communicate with each other via service name. I have been told this should be easily possible with any kubernetes environment, but have not been able to figure it out with microk8s. When I exec into a service shell and curl, I consistently get hostname could not be resolved.

Right now I am also dealing with a pod startup error after doing microk8s enable dns. I have not editted the config file (configmap/coredns) in any way. I am not sure if this is related to my inability to curl between pods.

coredns-99d66c86d-d7brs                    0/1     CrashLoopBackOff   2 (18s ago)    40s
alexweinstein@Alexs-Laptop back-end % microk8s kubectl logs coredns-6f5f9b5d74-fl4k7 -n kube-system
/etc/coredns/Corefile:20 - Error during parsing: Unknown directive 'pods'

What Should Happen Instead?

After the coredns pod starts correctly, I should be able to exec into a pod and then curl [servicename:serviceport] with expected answers.

However, I may be overestimating the need for coredns here - please let me know if it is not necessary for for this task.

Introspection Report

inspection-report-20230622_105638.tar.gz

Environment: Mac M1

AlexWeinstein92 avatar Jun 22 '23 14:06 AlexWeinstein92