Nodes
By default, this is disabled.
vCluster syncs pseudo 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​patches
required object[] pro​
Patches patch the resource according to the provided specification.
patches
required object[] pro​path
required string pro​
Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied.
path
required string pro​expression
required string pro​
Expression transforms the value according to the given JavaScript expression.
expression
required string pro​reverseExpression
required string pro​
ReverseExpression transforms the value according to the given JavaScript expression.
reverseExpression
required string pro​reference
required object pro​
Reference treats the path value as a reference to another object and will rewrite it based on the chosen mode
automatically. In single-namespace mode this will translate the name to "vxxxxxxxxx" to avoid conflicts with
other names, in multi-namespace mode this will not translate the name.
reference
required object pro​apiVersion
required string pro​
APIVersion is the apiVersion of the referenced object.
apiVersion
required string pro​apiVersionPath
required string pro​
APIVersionPath is optional relative path to use to determine the kind. If APIVersionPath is not found, will fallback to apiVersion.
apiVersionPath
required string pro​kind
required string pro​
Kind is the kind of the referenced object.
kind
required string pro​kindPath
required string pro​
KindPath is the optional relative path to use to determine the kind. If KindPath is not found, will fallback to kind.
kindPath
required string pro​namePath
required string pro​
NamePath is the optional relative path to the reference name within the object.
namePath
required string pro​namespacePath
required string pro​
NamespacePath is the optional relative path to the reference namespace within the object. If omitted or not found, namespacePath equals to the
metadata.namespace path of the object.
namespacePath
required string pro​labels
required object pro​
Labels treats the path value as a labels selector.
labels
required object pro​