Networking
The networking section of vcluster.yaml configures how workloads in a cluster reach services and DNS names, both inside the cluster and on the control plane cluster. Syncing networking resources such as Services, Ingresses, and Gateway API objects is configured under Resource synchronization.
Configure networking​
- Replicate services between the cluster and the control plane cluster, or between clusters.
- Resolve DNS names of services in the control plane cluster or in other clusters.
- Gateway API routes traffic to workloads through shared gateways.
- Ingress access exposes the cluster's API server through an Ingress when you create the cluster.
- Advanced networking covers kubelet proxying, fallback DNS, and other advanced options.
- Use a control plane cluster registry explains how pods pull images from a registry on the control plane cluster.
Ingress traffic​
Ingress to Service​
The vCluster has the option to enable Ingress resource synchronization. That means that you can create an ingress in a vCluster to make a service in this vCluster available using a hostname or domain. However, instead of having to run a separate ingress controller in each vCluster, the ingress resource synchronizes to the underlying cluster (when enabled) which means that the vCluster can use a shared ingress controller that is running in the control plane cluster. This helps to share resources across different clusters and is easier for users of clusters because otherwise, they would need to install an ingress controller and manually configure DNS for each vCluster.
From inside a cluster​
Pod in the cluster to Pod in the same cluster​
Pods run inside the underlying control plane cluster. vCluster's syncer component syncs Pods between the control plane cluster and the cluster. These synced Pods have cluster-internal IP addresses and can communicate with each other using IP-based networking.
No additional configuration is required for Pod to Pod networking in the same cluster.
Pod in the cluster to Service in the same cluster​
To allow pods to communicate with services, vCluster also synchronizes Service objects, while stripping away unnecessary information from the resource. However, instead of using the DNS names of the Services inside the control plane cluster, vCluster has its own DNS service which allows cluster pods to use much more intuitive DNS mappings, just as in a regular cluster.
No additional configuration is required for Pod to Service networking in the same cluster.
Pod in the cluster to Service in the control plane cluster​
See Replicate services.
Pod in the cluster to Service in a different cluster​
See Resolve DNS.
From the control plane cluster​
Pod in the control plane cluster to Service in the cluster​
See Replicate services.
Service CIDR and Pod CIDR​
To configure the service CIDR or pod CIDR of the cluster, set them under privateNodes, for example:
privateNodes:
enabled: true
networking:
podCIDR: 10.64.0.0/16
serviceCIDR: 10.128.0.0/16
Config reference​
For every field under networking, see the networking reference.