From 115d7975862f92fe5fbf21f3e3c4b2c914f98f4a Mon Sep 17 00:00:00 2001 From: Dominik Chilla Date: Sat, 8 May 2021 18:43:57 +0200 Subject: [PATCH] k3d upstream DNS --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 61341a7..6634aee 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,22 @@ Error: Kubernetes cluster unreachable $ kubectl config view --raw > ~/kubeconfig-k3d.yaml $ export KUBECONFIG=~/kubeconfig-k3d.yaml ``` +If you need to change the upstream DNS-resolver: +``` +kubectl -n kube-system edit configmap coredns +``` +Find the line containing +``` + forward . /etc/resolv.conf +``` +and change the content to +``` + forward . ipaddr.of.your.dns-resolver +``` +Finally redeploy the CoreDNS deployment with: +`kubectl -n kube-system rollout restart deployment coredns` + +**Note:** If you restart the cluster (`k3d cluster stop your-cluster` and `k3d cluster start your-cluster`), the changes will be gone! # Namespaces and resource limits ```