diff --git a/_partials/what-is-vcluster-yaml.mdx b/_partials/what-is-vcluster-yaml.mdx new file mode 100644 index 000000000..c54ef39cc --- /dev/null +++ b/_partials/what-is-vcluster-yaml.mdx @@ -0,0 +1,70 @@ + +import Deploy from '@site/vcluster/_partials/deploy/deploy-beta.mdx' +import DeployChanges from '@site/vcluster/_partials/deploy/deploy-changes-beta.mdx' + + +The `vcluster.yaml` file contains all configurations when deploying and upgrading virtual clusters. It's optionally passed to the CLI or as the values file for deployments using Helm. It is also possible to create a vCluster without a vcluster.yaml file which will be created with a set of default values. + +Example configurations include the vCluster control plane's [backing store](../configure/vcluster-yaml/control-plane/components/backing-store/), resource syncing behavior [from](../configure/vcluster-yaml/sync/from-host/) and [to](../configure/vcluster-yaml/sync/to-host/) the host cluster, and exporting the virtual cluster's [kubeconfig](../configure/vcluster-yaml/export-kube-config) file. + +- **Unified Configuration:** All settings for vCluster in one place, simplifying management. +- **Schema Validation:** Automatically validate the configuration when using the vCluster CLI. +- **IDE Support:** Integrated schema with popular IDEs for autocompletion and validation. + +#### Example `vcluster.yaml` file + +```yaml +controlPlane: + backingStore: + etcd: + embedded: + enabled: true + ingress: + enabled: true + host: vcluster-k8s-api.example.com +sync: + toHost: + serviceAccounts: + enabled: true + fromHost: + nodes: + enabled: true + clearImageStatus: true +exportKubeConfig: + context: my-vcluster-context + server: https://vcluster-k8s-api.example.com + secret: + name: my-vcluster-kubeconfig +``` + +This example configuration defines: +1. [Embedded etcd](../configure/vcluster-yaml/control-plane/components/backing-store/etcd/embedded) as the vCluster control plane's backing store to reduce management overhead (Pro feature). +1. Syncing [ServiceAccount](../configure/vcluster-yaml/sync/to-host/advanced/service-accounts) resources from the virtual to the host cluster, to support, for example, AWS IRSA. +1. Deploying an [Ingress](../configure/vcluster-yaml/control-plane/deployment/ingress) resource on the host cluster to expose the vCluster control plane's API server at a hostname. +1. Syncing real [node](../configure/vcluster-yaml/sync/from-host/nodes) data, rather than the default "pseudo" nodes, but clears the `ImageStatuses` field within the `NodeStatus` of the synced nodes. +1. How to export the [kubeconfig](../configure/vcluster-yaml/export-kube-config) file to a secret, so you can use it, for example, in your ArgoCD or Terraform pipelines. + +## How to Use `vcluster.yaml` +### Creating a New Virtual Cluster +- Define your configurations in the `vcluster.yaml` file. +- Deploy your virtual cluster. + + + +### Updating Existing Virtual Clusters +- Simply update your `vcluster.yaml` file with the new configurations. +- Apply the updates. + + + + +## FAQs + +### How do I upgrade my 0.19.x and earlier virtual cluster configurations? +If you have existing 0.19.x virtual clusters, you can convert the old configuration values to the new v0.20 format. [View the guide](../reference/migrations/0-20-migration) for more details. + +### Is it required to provide a `vcluster.yaml` file? +No, if a `vcluster.yaml` file isn't provided, the vCluster will be created using a set of default values. + +### Can I change the configuration for existing virtual clusters? +Yes, you can run `vcluster create VCLUSTER_NAME --upgrade -f vcluster.yaml` diff --git a/platform/api/resources/vcluster-yaml/README.mdx b/platform/api/resources/vcluster-yaml/README.mdx deleted file mode 100644 index dd641233c..000000000 --- a/platform/api/resources/vcluster-yaml/README.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: vcluster.yaml configuration reference -sidebar_label: vcluster.yaml ---- - -import External from '@site/platform/api/_partials/resources/config/external.mdx' - -## Create a virtual cluster with a config file - -:::note -Here you will find configuration options that apply only to the vCluster platform. For further details on the `vcluster.yaml` configuration -please see [vcluster.yaml](/docs/vcluster/configure/vcluster-yaml). -::: - - -## Config reference - - - - diff --git a/platform/virtual-clusters/configure/_category_.json b/platform/virtual-clusters/configure/_category_.json new file mode 100644 index 000000000..b2bc999c3 --- /dev/null +++ b/platform/virtual-clusters/configure/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Configure", + "collapsible": false +} + diff --git a/platform/virtual-clusters/configure/vcluster-yaml/README.mdx b/platform/virtual-clusters/configure/vcluster-yaml/README.mdx new file mode 100644 index 000000000..7d86e220f --- /dev/null +++ b/platform/virtual-clusters/configure/vcluster-yaml/README.mdx @@ -0,0 +1,19 @@ +--- +title: What is vcluster.yaml (w/Pro)? +sidebar_label: vcluster.yaml +--- + +import External from '@site/platform/api/_partials/resources/config/external.mdx' +import WhatIsVclusterYaml from '@site/_partials/what-is-vcluster-yaml.mdx' + + + +## Pro Features + +All the OSS features are applicable in any `vcluster.yaml`. Below are the Pro features only available on the vCluster Platform. + +### Config reference + + + + diff --git a/platform/api/resources/vcluster-yaml/external/platform/api-key.mdx b/platform/virtual-clusters/configure/vcluster-yaml/external/platform/api-key.mdx similarity index 100% rename from platform/api/resources/vcluster-yaml/external/platform/api-key.mdx rename to platform/virtual-clusters/configure/vcluster-yaml/external/platform/api-key.mdx diff --git a/platform/api/resources/vcluster-yaml/external/platform/auto-delete.mdx b/platform/virtual-clusters/configure/vcluster-yaml/external/platform/auto-delete.mdx similarity index 100% rename from platform/api/resources/vcluster-yaml/external/platform/auto-delete.mdx rename to platform/virtual-clusters/configure/vcluster-yaml/external/platform/auto-delete.mdx diff --git a/platform/api/resources/vcluster-yaml/external/platform/auto-sleep.mdx b/platform/virtual-clusters/configure/vcluster-yaml/external/platform/auto-sleep.mdx similarity index 100% rename from platform/api/resources/vcluster-yaml/external/platform/auto-sleep.mdx rename to platform/virtual-clusters/configure/vcluster-yaml/external/platform/auto-sleep.mdx diff --git a/platform/virtual-clusters/configure/what-is-vcluster-yaml.mdx b/platform/virtual-clusters/configure/what-is-vcluster-yaml.mdx new file mode 100644 index 000000000..f072b468d --- /dev/null +++ b/platform/virtual-clusters/configure/what-is-vcluster-yaml.mdx @@ -0,0 +1,8 @@ +--- +title: What is vcluster.yaml +sidebar_position: 1 +--- + +import WhatIsVclusterYaml from '@site/vcluster/configure/what-is-vcluster-yaml.mdx'; + + diff --git a/vcluster/configure/vcluster-yaml/external/README.mdx b/vcluster/configure/vcluster-yaml/external/README.mdx new file mode 100644 index 000000000..45e604233 --- /dev/null +++ b/vcluster/configure/vcluster-yaml/external/README.mdx @@ -0,0 +1,28 @@ +--- +title: External Configuration +sidebar_label: external +--- + +import ProAdmonition from '@site/vcluster/_partials/admonitions/pro-admonition.mdx' +import Platform from '@site/platform/api/_partials/resources/config/external/platform.mdx' + + + +The external section is for configuring tools external to vCluster. + +## Platform + +In the platform section you can configure vCluster Platform features like autoSleep + +### Example + +```yaml +external: + platform: + autoSleep: + afterInactivity: 600 # 10 minutes +``` + +## Config reference + + diff --git a/vcluster/configure/what-is-vcluster-yaml.mdx b/vcluster/configure/what-is-vcluster-yaml.mdx index b6b57754a..6407bfa11 100644 --- a/vcluster/configure/what-is-vcluster-yaml.mdx +++ b/vcluster/configure/what-is-vcluster-yaml.mdx @@ -5,72 +5,6 @@ sidebar_position: 1 description: Intro to the vcluster.yaml configuration file --- -import Deploy from '@site/vcluster/_partials/deploy/deploy-beta.mdx' -import DeployChanges from '@site/vcluster/_partials/deploy/deploy-changes-beta.mdx' +import WhatIsVclusterYaml from '@site/_partials/what-is-vcluster-yaml.mdx' - -The `vcluster.yaml` file contains all configurations when deploying and upgrading virtual clusters. It's optionally passed to the CLI or as the values file for deployments using Helm. It is also possible to create a vCluster without a vcluster.yaml file which will be created with a set of default values. - -Example configurations include the vCluster control plane's [backing store](../configure/vcluster-yaml/control-plane/components/backing-store/), resource syncing behavior [from](../configure/vcluster-yaml/sync/from-host/) and [to](../configure/vcluster-yaml/sync/to-host/) the host cluster, and exporting the virtual cluster's [kubeconfig](../configure/vcluster-yaml/export-kube-config) file. - -- **Unified Configuration:** All settings for vCluster in one place, simplifying management. -- **Schema Validation:** Automatically validate the configuration when using the vCluster CLI. -- **IDE Support:** Integrated schema with popular IDEs for autocompletion and validation. - -#### Example `vcluster.yaml` file - -```yaml -controlPlane: - backingStore: - etcd: - embedded: - enabled: true - ingress: - enabled: true - host: vcluster-k8s-api.example.com -sync: - toHost: - serviceAccounts: - enabled: true - fromHost: - nodes: - enabled: true - clearImageStatus: true -exportKubeConfig: - context: my-vcluster-context - server: https://vcluster-k8s-api.example.com - secret: - name: my-vcluster-kubeconfig -``` - -This example configuration defines: -1. [Embedded etcd](../configure/vcluster-yaml/control-plane/components/backing-store/etcd/embedded) as the vCluster control plane's backing store to reduce management overhead (Pro feature). -1. Syncing [ServiceAccount](../configure/vcluster-yaml/sync/to-host/advanced/service-accounts) resources from the virtual to the host cluster, to support, for example, AWS IRSA. -1. Deploying an [Ingress](../configure/vcluster-yaml/control-plane/deployment/ingress) resource on the host cluster to expose the vCluster control plane's API server at a hostname. -1. Syncing real [node](../configure/vcluster-yaml/sync/from-host/nodes) data, rather than the default "pseudo" nodes, but clears the `ImageStatuses` field within the `NodeStatus` of the synced nodes. -1. How to export the [kubeconfig](../configure/vcluster-yaml/export-kube-config) file to a secret, so you can use it, for example, in your ArgoCD or Terraform pipelines. - -## How to Use `vcluster.yaml` -### Creating a New Virtual Cluster -- Define your configurations in the `vcluster.yaml` file. -- Deploy your virtual cluster. - - - -### Updating Existing Virtual Clusters -- Simply update your `vcluster.yaml` file with the new configurations. -- Apply the updates. - - - - -## FAQs - -### How do I upgrade my 0.19.x and earlier virtual cluster configurations? -If you have existing 0.19.x virtual clusters, you can convert the old configuration values to the new v0.20 format. [View the guide](../reference/migrations/0-20-migration) for more details. - -### Is it required to provide a `vcluster.yaml` file? -No, if a `vcluster.yaml` file isn't provided, the vCluster will be created using a set of default values. - -### Can I change the configuration for existing virtual clusters? -Yes, you can run `vcluster create VCLUSTER_NAME --upgrade -f vcluster.yaml` \ No newline at end of file +