You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

apiVersion: v1
kind: ConfigMap
metadata:  
  name: coredns-custom  
  namespace: kube-system 
data:
  example.server: | # All custom server files must have a ".server" file extension. 
    # Change example.com to the domain you wish to forward.
    example.com {
      # Change 1.1.1.1 to your customer DNS resolver.
      forward . 1.1.1.1
    }


Create the ConfigMap by entering:

kubectl apply -f <filename>.yaml


Verify the customizations have been applied by entering:

kubectl get configmaps --namespace=kube-system coredns-custom -o yaml


Force CoreDNS to reload the ConfigMap by entering:

kubectl delete pod --namespace kube-system -l k8s-app=kube-dns





References

  • No labels