import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

<Tabs
  defaultValue="vcluster"
  values={[
    { label: 'vcluster', value: 'vcluster', },
    { label: 'helm', value: 'helm', },
    { label: 'kubectl', value: 'kubectl', },
  ]
}>
<TabItem value="vcluster">

Create a `values.yaml` file with the following lines:

```yaml
fsGroup: 12345
securityContext:
  runAsUser: 12345
  runAsGroup: 12345
  runAsNonRoot: true

```

Then create the vCluster with the following command:
```
vcluster create my-vcluster -f values.yaml
```

</TabItem>
<TabItem value="helm">

Update the `vcluster.yaml` file described in the [deployment guide](../getting-started/deployment.mdx).

You will need to add the `securityContext` block as shown below:

```yaml
fsGroup: 12345
securityContext:
  runAsUser: 12345
  runAsGroup: 12345
  runAsNonRoot: true
```

Then, install helm chart using `vcluster.yaml` for chart values as described in the [deployment guide](../getting-started/deployment.mdx).

</TabItem>
<TabItem value="kubectl">

You will need to add the `securityContext` blocks to the containers as shown below:

```
kubectl create namespace host-namespace-1
helm template my-vcluster vcluster --repo https://charts.loft.sh --set securityContext.runAsGroup=12345 --set fsGroup=12345 --set securityContext.runAsUser=12345 --set securityContext.runAsNonRoot=true -n host-namespace-1 | kubectl apply -f -
```
</TabItem>
</Tabs>
