--- title: "Create a Kubernetes Secret with VMS User Credentials for VAST COSI Driver" slug: "create-a-kubernetes-secret-with-vms-user-credentials-for-vast-cosi-driver-2-5" updated: 2026-11-04T01:33:41Z published: 2026-11-04T01:33:41Z canonical: "docs.vastdata.com/create-a-kubernetes-secret-with-vms-user-credentials-for-vast-cosi-driver-2-5" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Create a Kubernetes Secret with VMS User Credentials for VAST COSI Driver Create a Kubernetes [secret](https://kubernetes.io/docs/concepts/configuration/secret/) to keep [VMS user](/develop/docs/configure-vast-cluster-for-vast-csi-driver-2-5#set-up-a-vms-user) credentials that VAST COSI Driver will use to communicate with the VAST cluster. You need to supply the name of the secret when creating the VAST COSI Driver's Helm chart configuration file. This Kubernetes secret will be used for all bucket classes defined for the VAST COSI Driver in its Helm chart configuration file. The VAST cluster to connect is specified on the `endpoint` parameter in the configuration file. 1. Create a YAML file with the following content. Note that the VMS user's username and password must be Base64-encoded: ```plaintext apiVersion: v1 kind: Secret metadata:  name: type: Opaque data:  username:  password: ``` 2. Apply the YAML file: ```plaintext kubectl apply -f ``` Alternatively, you can create a secret with the following command: ```plaintext kubectl create secret generic \    --from-literal=username='' \    --from-literal=password='' \ ``` > [!NOTE] > **Note** > > If you are creating the secret in a Kubernetes namespace that is different from the namespace used to install the VAST COSI Driver Helm chart, specify the secret's namespace on the command: `-n <secret's namespace>`.