Skip to main content

Use Virtual Kubernetes Services

Updated at: 2025-11-18 10:04:25

After a user has activated and been authorized to use VKS (Virtual Kubernetes Services), the VKS can be accessed and utilized by configuring environment variables. Detailed instructions are provided below.

Prerequisites

  • VKS has been created, and is functioning properly. If it has not been activated yet, you can refer to Create Virtual Kurbernets Services to complete the activation.
  • The user has been granted access by the administrator to the corresponding VKS. The enterprise administrator can grant access by referring to Authorize Virtual Kubernets Services to complete the authorization process.
  • The user need to install the command-line tool (kubectl).
tip

To ensure proper operation of VKS, it is strongly recommended not to delete any resources visible after connecting to the cluster via Kubeconfig for the first time.

Operation Steps

Users can operate VKS by configuring environment variables. Follow the steps below:

  1. Log in to the Alaya NeW platform using your registered enterprise account, and click [Product Center/Computing/Virtual Kubernetes Services].

  2. Click "Cluster Management" to open the cluster list, then locate the activated VKS Cluster, as highlighted below.

    vksuserlist

  3. Click the "kubeconfig Download" link (highlighted in green above) to download the kubeconfig file to your local machine.

  4. Open a terminal and navigate to the directory where the kubeconfig file was downloaded. The following sections describe how to configure environment variables on different operating systems.

  1. In the terminal, run the following command to configure the environment variable for accessing VKS, as shown below:

    vksuserlist

    $env:KUBECONFIG="yourpath"
    Tip

    Replace yourpath with the actual path to your VKS kubeconfig file.

  2. Run the following command to verify whether the cluster connection is successful. If the output appears as shown in the highlighted section below, the cluster is connected successfully.

    vksuserlist

    kubectl cluster-info
Important

The environment variable configuration for VKS is valid only within the current terminal session. Once the terminal window is closed, the configuration will no longer persist.