Skip to content

Commit fec18b8

Browse files
[v4.5.0] fix (platform): add importing existing vcluster to platform through helm values (#1338) (#1368)
* Backport: Copy platform/use-platform/virtual-clusters/add-virtual-clusters.mdx to platform_versioned_docs/version-4.5.0/use-platform/virtual-clusters/add-virtual-clusters.mdx * fix broken links --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guowenatk <[email protected]>
1 parent 3ea7459 commit fec18b8

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

platform_versioned_docs/version-4.5.0/use-platform/virtual-clusters/add-virtual-clusters.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,14 @@ Organizations often have existing deployment pipelines using tools like Helm, Ar
114114

115115
### Post-deployment platform registration
116116

117-
After deploying your vCluster using your existing tools, add it to <GlossaryTerm term="platform">the Platform</GlossaryTerm> and enable full management:
117+
After deploying your vCluster using your existing tools, add it to <GlossaryTerm term="platform">the Platform</GlossaryTerm> and enable full management.
118118

119+
First, login with the platform [access key](../../api/authentication):
120+
```bash
121+
vcluster platform login [domain] --access-key=[ACCESS_KEY]
122+
```
123+
124+
Then, add the virtual cluster to the platform by running:
119125
<InterpolatedCodeBlock
120126
code={`# Assuming you have already deployed a vCluster using Helm, Argo CD, or another tool
121127
@@ -127,6 +133,17 @@ vcluster platform add vcluster [[VAR:VCLUSTER_NAME:vc-name]] \\
127133
language="bash"
128134
/>
129135

136+
You can also use Helm values by updating the `vcluster.yaml` to include the access key of the platform as follows and then upgrade or restart
137+
the virtual cluster.
138+
```yaml
139+
external:
140+
platform:
141+
apiKey:
142+
secretName: vcluster-platform-api-key # Defaults to vcluster-platform-api-key if undefined
143+
namespace: vcluster-namespace # Namespace to search for the secret. If undefined, it searches the vCluster namespace. If different, vCluster needs access to the target namespace.
144+
```
145+
The platform access key can only be provided as a Kubernetes Secret. You can find more information of how to create such Secret at the [`apiKey` configuration section of vCluster.](../../../vcluster/configure/vcluster-yaml/external/platform/api-key).
146+
130147
### Helm wrapper for VirtualClusterInstance
131148

132149
Create a Helm chart that deploys the VirtualClusterInstance directly, allowing the Platform to manage the vCluster from creation. This approach is ideal when you want Helm to deploy the CRD but let the Platform handle the actual vCluster.

0 commit comments

Comments
 (0)