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 proenabled
required boolean false pro
Enabled defines if coredns is enabled
enabled
required boolean false proembedded
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 proservice
required object pro
Service holds extra options for the coredns service deployed within the virtual cluster
service
required object prodeployment
required object pro
Deployment holds extra options for the coredns deployment deployed within the virtual cluster
deployment
required object proimage
required string pro
Image is the coredns image to use
image
required string proreplicas
required integer pro
Replicas is the amount of coredns pods to run.
replicas
required integer pronodeSelector
required object pro
NodeSelector is the node selector to use for coredns.
nodeSelector
required object proresources
required object pro
Resources are the desired resources for coredns.
resources
required object propods
required object pro
Pods is additional metadata for the coredns pods.
pods
required object proannotations
required object pro
Annotations are extra annotations for this resource.
annotations
required object prolabels
required object pro
Labels are extra labels for this resource.
labels
required object prooverwriteConfig
required string pro
OverwriteConfig can be used to overwrite the coredns config
overwriteConfig
required string prooverwriteManifests
required string pro
OverwriteManifests can be used to overwrite the coredns manifests used to deploy coredns
overwriteManifests
required string propriorityClassName
required string pro
PriorityClassName specifies the priority class name for the CoreDNS pods.
priorityClassName
required string pro