Nodes
By default, this is disabled.
vCluster syncs psuedo nodes from the host cluster where there are virtual cluster pods running. Pseudo nodes only have real values for the CPU, architecture, and operating system, while everything else is randomly generated. A single pseudo node can either represent a single real node on the host cluster, or it can represent multiple real nodes. If there are no more pods on a node, vCluster deletes the pseudo node.
However, when you need to access specific node information, you can choose to sync real nodes from the host cluster to the virtual cluster. This requires a cluster role.
Sync pseudo nodes (Default)​
Sync pseudo nodes to the virtual cluster. This default configuration does not require a cluster role.
sync:
fromHost:
nodes:
enabled: false
vCluster ignores selector.all
and selector.labels
. However, if you create a pod with spec.nodeSelector
, the syncer creates a pseudo node with annotations and labels based on the real node so that the pod's node selector references something that also exists in the virtual cluster.
See the Kubernetes docs for spec.nodeSelector details.
Sync real nodes​
Sync real nodes to the virtual cluster where virtual cluster pods are running:
sync:
fromHost:
nodes:
enabled: true
Sync pseudo nodes with label selector​
Sync pseudo nodes nodes that match a given label selector. This example sets the node selector to the same values when syncing a pod from virtual cluster to host cluster:
sync:
fromHost:
nodes:
enabled: false
selector:
labels:
environment: production
team: backend
Sync real nodes with label selector​
Sync real nodes nodes that match a given label selector. This example sets the node selector to the same values when syncing a pod from virtual cluster to host cluster:
sync:
fromHost:
nodes:
enabled: true
selector:
labels:
environment: production
team: backend
Sync all real nodes​
Sync all real nodes, regardless of whether a virtual cluster pod is running on it or not:
sync:
fromHost:
nodes:
enabled: true
selector:
all: true
Sync real nodes and sync back labels and taints​
Enable syncing real nodes from the host cluster to the virtual cluster as well as syncing back from the virtual cluster any changes to node labels and taints. Enabling this adds RBAC permissions to the syncer component to allow it to modify the host nodes and statuses.
sync:
fromHost:
nodes:
enabled: true
syncBackChanges: true
Sync real nodes and hide image information​
Enable syncing real nodes. This clears all status.images
from the node when it is synced to the virtual cluster. For certain multi-tenant use cases, such as multi-customer tenancy, images can leak sensitive information about a node.
sync:
fromHost:
nodes:
enabled: true
clearImageStatus: true
Config reference​
nodes
required object pro​
Nodes defines if nodes should get synced from the host cluster to the virtual cluster, but not back.
nodes
required object pro​enabled
required boolean false pro​
Enabled specifies if syncing real nodes should be enabled. If this is disabled, vCluster will create fake nodes instead.
enabled
required boolean false pro​syncBackChanges
required boolean false pro​
SyncBackChanges enables syncing labels and taints from the virtual cluster to the host cluster. If this is enabled someone within the virtual cluster will be able to change the labels and taints of the host cluster node.
syncBackChanges
required boolean false pro​clearImageStatus
required boolean false pro​
ClearImageStatus will erase the image status when syncing a node. This allows to hide images that are pulled by the node.
clearImageStatus
required boolean false pro​selector
required object pro​
Selector can be used to define more granular what nodes should get synced from the host cluster to the virtual cluster.
selector
required object pro​all
required boolean false pro​
All specifies if all nodes should get synced by vCluster from the host to the virtual cluster or only the ones where pods are assigned to.
all
required boolean false pro​labels
required object {} pro​
Labels are the node labels used to sync nodes from host cluster to virtual cluster. This will also set the node selector when syncing a pod from virtual cluster to host cluster to the same value.
labels
required object {} pro​