You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -15,10 +15,12 @@ vCluster syncs pseudo nodes from the host cluster where there are virtual cluste
15
15
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.
16
16
17
17
:::info Node IP obfuscation
18
-
By default, vCluster obfuscates node IP addresses—replacing real IPs with placeholder values—when syncing real nodes. This prevents internal network details from being exposed within the virtual cluster. For more information, see [Control node IP visibility](../../../../learn-how-to/control-node-ip-visibility.mdx).
18
+
By default, vCluster obfuscates node IP addresseswhen syncing real nodes to protect sensitive information. Learn how to [control node IP visibility](../../../../learn-how-to/control-node-ip-visibility.mdx) for your use case.
19
19
:::
20
20
21
-
### Sync pseudo nodes
21
+
### Sync pseudo nodes (default)
22
+
23
+
### Sync pseudo nodes
22
24
23
25
Sync pseudo nodes to the virtual cluster. This is enabled by default. This default configuration does not require a cluster role.
24
26
@@ -29,7 +31,7 @@ sync:
29
31
enabled: false
30
32
```
31
33
32
-
vCluster ignores the `selector.all` and `selector.labels` fields. However, if a pod is created with `spec.nodeSelector`, the syncer generates a pseudo node in the virtual cluster. This pseudo node includes annotations and labels from the real node, allowing the pod’s node selector to match a corresponding node within the virtual cluster.
34
+
vCluster ignores the `selector.all` and `selector.labels` fields. However, if a pod is created with `spec.nodeSelector`, the syncer generates a pseudo node in the virtual cluster. This pseudo node includes annotations and labels from the real node, allowing the pod's node selector to match a corresponding node within the virtual cluster.
33
35
34
36
For more information, see the Kubernetes documentation on [`spec.nodeSelector`](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector).
35
37
@@ -145,5 +147,4 @@ For more advanced use cases, such as controlling node IP visibility, see the [co
Copy file name to clipboardExpand all lines: vcluster/configure/vcluster-yaml/sync/to-host/advanced/custom-resources.mdx
+60-22Lines changed: 60 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ import CertManagerConfig from '!!raw-loader!@site/vcluster/configure/vcluster-ya
16
16
17
17
vCluster allows you to sync custom resources from the virtual cluster to the host cluster. This allows you to sync arbitrary resources that are by default not synced by vCluster. This only works for resources that have a custom resource definition in the host cluster.
18
18
19
-
If those custom resources will create other resources inside the host cluster, vCluster will try to find them and sync them back to the host cluster as well. E.g. a [cert-manager](https://cert-manager.io/) certificate creates a secret which will be synced back automatically into the virtual cluster.
19
+
If those custom resources create other resources inside the host cluster, vCluster tries to find them and syncs them back to the host cluster as well. E.g. a [cert-manager](https://cert-manager.io/) certificate creates a secret which syncs back automatically into the virtual cluster.
20
20
21
-
vCluster will automatically add the required cluster and namespace RBAC permissions for retrieving the custom resource definition and syncing the resources from the virtual cluster to the host cluster.
21
+
vCluster automatically adds the required cluster and namespace RBAC permissions for retrieving the custom resource definition and syncing the resources from the virtual cluster to the host cluster.
22
22
<br />
23
23
24
24
:::info Only Namespace-Scoped Resource
@@ -29,7 +29,7 @@ This feature currently only works for namespace-scoped resources only.
29
29
If you want to sync many custom resources, consider using [multi-namespace-mode](../../../experimental/multi-namespace-mode).
To enable custom resource syncing from the virtual cluster to the host cluster, figure out what CRDs you want to sync via `kubectl get crds`. Add the name into the `customResources` section in the sync section. Even though vCluster syncs custom resources from the virtual cluster to the host cluster, the CRDs are also copied from the host cluster to the virtual cluster.
35
35
@@ -45,7 +45,7 @@ sync:
45
45
46
46
## Patches
47
47
48
-
You can modify the sync behaviour with patches that target specific paths. Currently there is 2 different kinds of patches supported.
48
+
You can modify the sync behavior with patches that target specific paths. Currently there are 2 different kinds of patches supported.
49
49
50
50
:::info Wildcard patches
51
51
You can use `*` in paths to select all entries of an array or object, e.g. `spec.containers[*].name` or `spec.containers[*].volumeMounts[*]`. vCluster calls the patch multiple times.
@@ -75,9 +75,12 @@ vCluster translates the path `spec.secretName` as it points to a secret. If the
75
75
With multi-namespace-mode you only need to rewrite references that include a namespace. You can use the `namespacePath` option to specify the path of the namespace of the reference.
These are JavaScript ES6 compatible expression patches that can be used to change a field while syncing. You define how it changes when syncing from the virtual cluster into the host cluster or when syncing from the host cluster into the virtual cluster. To add a suffix to certificate DNS names you can:
79
83
80
-
These are powerful JavaScript ES6 compatible expression patches that can be used to change a field while syncing. You define how it changes when syncing from the virtual cluster into the host cluster or when syncing from the host cluster into the virtual cluster. To add a suffix to certificate DNS names you can do:
81
84
```yaml
82
85
sync:
83
86
toHost:
@@ -93,14 +96,15 @@ sync:
93
96
```
94
97
95
98
There is also a variable called `context` besides `value` that can be used to access vCluster specific data:
96
-
* `context.vcluster.name`: Name of the virtual cluster
97
-
* `context.vcluster.namespace`: Namespace of the virtual cluster
98
-
* `context.vcluster.config`: Config of the virtual cluster, basically `vcluster.yaml` merged with the defaults
99
-
* `context.hostObject`: Host object (can be null if not available)
100
-
* `context.virtualObject`: Virtual object (can be null if not available)
101
-
* `context.path`: The matched path on the object, useful when using wildcard path selectors (*)
102
-
103
-
For example, let's assume you want to add `www.` to every DNS name specified in a cert-manager certificate in the path `spec.dnsNames`, you could use the following patch:
99
+
- `context.vcluster.name`: Name of the virtual cluster
100
+
- `context.vcluster.namespace`: Namespace of the virtual cluster
101
+
- `context.vcluster.config`: Config of the virtual cluster, basically `vcluster.yaml` merged with the defaults
102
+
- `context.hostObject`: Host object (can be null if not available)
103
+
- `context.virtualObject`: Virtual object (can be null if not available)
104
+
- `context.path`: The matched path on the object, useful when using wildcard path selectors (*)
105
+
106
+
For example, to add `www.` to every DNS name specified in a cert-manager certificate in the path `spec.dnsNames`, you can use the following patch:
0 commit comments