CoreDNS
Separate CoreDNS​
Each vCluster has its own DNS service (CoreDNS by default) so that pods and services can locate each other by hostnames. The vCluster syncer ensures that the intuitive naming logic of Kubernetes DNS names for services applies. Users can connect to these DNS names, which map to the IP address of the synchronized services that are present in the host cluster. However, this also means that you can't directly access host services from inside the virtual cluster via DNS. Host cluster pods can only access virtual cluster services by their synced name.
Customize the CoreDNS deployment if you need to pull the CoreDNS image from a private registry.
See DNS for Services and Pods for details on Kubernetes DNS.
A normal vCluster deployment consists of two pods per vCluster instance:
- vCluster Pod
- API server container
- Syncer container
- CoreDNS Pod
Integrated CoreDNS​
(Pro) The integrated CoreDNS feature lets you run CoreDNS as part of the syncer, which saves the overhead of an external CoreDNS pod.
- vCluster Pod
- API server container
- Syncer and CoreDNS container
Key benefits to this approach include:
- Avoiding cluster max pods limit
- Optimizing resource allocation
Config reference​
Deprecated Field | New Field |
---|---|
coredns.config | coredns.overwriteConfig |
coredns.manifests | coredns.overwriteManifests |
coredns
required object pro​
CoreDNS defines everything related to the coredns that is deployed and used within the vCluster.
coredns
required object pro​enabled
required boolean true pro​
Enabled defines if coredns is enabled
enabled
required boolean true pro​embedded
required boolean false pro​
Embedded defines if vCluster will start the embedded coredns service within the control-plane and not as a separate deployment. This is a PRO feature.
embedded
required boolean false pro​service
required object pro​
Service holds extra options for the coredns service deployed within the virtual cluster
service
required object pro​deployment
required object pro​
Deployment holds extra options for the coredns deployment deployed within the virtual cluster
deployment
required object pro​image
required string pro​
Image is the coredns image to use
image
required string pro​replicas
required integer 1 pro​
Replicas is the amount of coredns pods to run.
replicas
required integer 1 pro​nodeSelector
required object {} pro​
NodeSelector is the node selector to use for coredns.
nodeSelector
required object {} pro​affinity
required object {} pro​
Affinity is the affinity to apply to the pod.
affinity
required object {} pro​tolerations
required object[] [] pro​
Tolerations are the tolerations to apply to the pod.
tolerations
required object[] [] pro​