This topic describes how to deploy a pod on an RDS Custom container series node (AI node or Node Lingjun) using a private container image.
Prerequisites
You have activated an Enterprise Edition instance of Container Registry (ACR). For more information, see Create a Container Registry instance.
You have completed the prerequisite tasks for using an ACR Enterprise Edition instance. These tasks include binding a source code platform, creating a namespace, and creating an image repository. For more information, see Steps 1 to 3 in Build an image using an Enterprise Edition instance.
You have created an ACK managed cluster Pro Edition. For more information, see Create an ACK managed cluster.
You have created an RDS Custom container series node and added it to an ACK managed cluster Pro Edition. For more information, see RDS Custom container series node user guide.
Procedure
Connect to the ACK cluster using kubectl. For more information, see Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.
Run the following command to create a Kubernetes Secret:
kubectl create secret docker-registry acr-secret-inner \ --docker-server=beijing-acr-registry-vpc.cn-beijing.cr.aliyuncs.com \ --docker-username=ACK@rctest \ --docker-password=Testpassword@123Noteregsecret: The custom name of the secret.--docker-server: The address of the Docker repository.--docker-username: The username for the Docker repository.--docker-password: The password for the Docker repository.
Run the following command to verify that the Secret was created:
kubectl get secrets acr-secret-inner -o yamlCreate a pod configuration file.
Save the following content as
pod.yaml.apiVersion: v1 kind: Pod metadata: name: sglang-qwen3 # The name of the pod. spec: containers: - command: - sh - -c - echo hello world; sleep infinity; # The command to run after the container starts. This is an example. image: beijing-acr-registry-vpc.cn-beijing.cr.aliyuncs.com/testvnode/acr-beijing:sglang_v1 # The address of the private image. imagePullPolicy: IfNotPresent # Pulls the image only if it is not present locally. In a production environment, set this parameter to Always. name: sglang # The name of the container. ports: - containerPort: 8000 # The port that the container listens on. name: restful protocol: TCP resources: requests: cpu: "80" memory: "300Gi" nvidia.com/gpu: "8" limits: cpu: "80" memory: "300Gi" nvidia.com/gpu: "8" restartPolicy: Always # Restarts the pod if it fails. imagePullSecrets: # The Secret used to pull the private image. - name: acr-secret-inner nodeSelector: # Schedules the pod to a node with the specified label (a virtual node). alibabacloud.com/virtual-node: "true" tolerations: # Tolerates the taints of the virtual node. - effect: NoSchedule key: virtual-kubelet.io/provider value: aliclouddbRun the following command to deploy the pod:
kubectl apply -f pod.yaml