FAQ
Answers to common questions when using Elastic Container Instance (ECI) in Container Service for Kubernetes (ACK).
ECI pods
How do I create a GPU-accelerated elastic container instance?
Specify a GPU-accelerated Elastic Compute Service (ECS) instance type when creating the pod. See Create a GPU-accelerated elastic container instance for the full procedure.
How do I find the ID of an elastic container instance?
In ACK, each pod maps to one elastic container instance. Use either of the following methods.
Method 1: kubectl
Run the following command and look in the Annotations section of the output:
kubectl describe pod <pod-name>The annotation k8s.aliyun.com/eci-instance-id holds the instance ID in the format eci-xxxx.
Name: nginx-deployment-baxx-xxxB-lkwfd
Namespace: default
Priority: 0
Node: virtual-kubelet-cn-beijing-k/172.xxx.xxx.234
Start Time: Wed, 08 Jun 2022 07:21:31 +0000
Labels: app=nginx
pod-template-hash=567d5c59f8
Annotations: ProviderCreate: done
k8s.aliyun.com/cluster-dns:
k8s.aliyun.com/cluster-domain: cluster.local
k8s.aliyun.com/eci-created-by-template: true
k8s.aliyun.com/eci-drop-apiserver-interactive-caps:
k8s.aliyun.com/eci-instance-cpu: 0.5
k8s.aliyun.com/eci-instance-id: eci-2zefca8k0xxxzqjr2
k8s.aliyun.com/eci-instance-mem: 1.0
k8s.aliyun.com/eci-instance-spec: 0.5-1.0Gi
k8s.aliyun.com/eci-instance-zone: cn-beijing-kMethod 2: ECI console
Go to the Elastic Container Instance console and open the Container Group page. Search by pod name — the container group ID is the instance ID, in the format eci-xxxx.
My pod was created with an image cache, but startup still takes more than 10 seconds. Is this expected?
Yes. On a standard node, the scheduler places a pod on an existing node without provisioning new resources, so startup completes in 2–3 seconds. ECI works differently: each pod requires dedicated resource provisioning. If you specify multiple zones, ECI tries each zone in order until it finds one with sufficient capacity, which adds time.
To reduce startup time, list the zone with the most available capacity first in your multi-zone configuration.
My ECI pod has been in the Pending state for hours. What do I do?
Run the following command to check pod events:
kubectl describe pod <pod-name>If the events show an API server connection timeout when mounting a volume, the instance cannot reach the API server. Do one of the following:
Check VPC connectivity — Confirm the pod and the cluster API server are in the same virtual private cloud (VPC).
Update SLB access control — If the cluster's Server Load Balancer (SLB) instance has access control enabled, add the pod's CIDR block to the access control list (ACL).
Scheduling
A pod is scheduled to the virtual-kubelet node but never runs. What do I do?
If the pod events show no updates after scheduling, query the Virtual Kubelet component logs to find the root cause.
At this point, the pod status shows Waiting in the container group list, and the monitoring information shows PodScheduled: True with no further events produced.
If events are present, troubleshoot based on the event messages directly.
On the Clusters page of the ACK console, find the cluster and choose More > Open Cloud Shell in the Actions column.
List the Virtual Kubelet pods to get the pod name:
kubectl -n kube-system get podsIn the command output,
ack-virtual-node-affinity-admission-controllerandack-virtual-node-controllerare the virtual-kubelet-related pods.shell@Alicloud:~$ kubectl -n kube-system get pods NAME READY STATUS RESTARTS AGE ack-virtual-node-affinity-admission-controller-b877f9dcb-tsz78 1/1 Running 0 3d21h ack-virtual-node-controller-5664954b96-zhrcs 1/1 Running 0 3d21h alibaba-log-controller-67d6fd6558-g69t6 1/1 Running 0 35d alicloud-application-controller-5c9d6f9ff8-w2nkr 1/1 Running 0 35d alicloud-disk-controller-65c588684d-b2rfs 1/1 Running 0 35d alicloud-monitor-controller-99d88f745-mc6dk 1/1 Running 0 35d aliyun-acr-credential-helper-7946599dd7-hmzv2 1/1 Running 0 35d coredns-7d577ff8d7-7sn4z 1/1 Running 0 35d coredns-7d577ff8d7-c4rr9 1/1 Running 0 35d flexvolume-c7c6c 1/1 Running 0 35d flexvolume-lnpvr 1/1 Running 0 35d flexvolume-z24nc 1/1 Running 0 35d kube-proxy-worker-4jjl8 1/1 Running 0 35d kube-proxy-worker-7vzp9 1/1 Running 0 35d kube-proxy-worker-kls4w 1/1 Running 0 35d logtail-ds-gkplj 1/1 Running 0 35d logtail-ds-jvxx4 1/1 Running 0 35d logtail-ds-snczh 1/1 Running 0 35d metrics-server-6b46f99d99-mhn7n 1/1 Running 0 35d nginx-ingress-controller-68c56cd9b6-gjvts 1/1 Running 0 35d nginx-ingress-controller-68c56cd9b6-wf2ht 1/1 Running 0 35d terway-9lstv 2/2 Running 0 35d terway-q5lqc 2/2 Running 0 35d terway-wszqg 2/2 Running 0 35d tiller-deploy-5c9c59b4dc-96jt6 1/1 Running 0 35d virtual-kubelet-autoscaler-76479fdcf-lvmwz 1/1 Running 0 3d21hFetch the logs, replacing
ack-virtual-node-controller-xxxxxxxxxxwith the actual pod name from step 2:kubectl -n kube-system logs ack-virtual-node-controller-xxxxxxxxxxIdentify the latest error messages and troubleshoot accordingly. If the cause is not clear, submit a ticket to Alibaba Cloud technical support and include the request ID and error messages.
The following is a sample error log:
time="2019-08-23T07:11:30Z" level=warning msg="requeuing \"vk/nginx-gpu-demo-1-fc769bdf6-5klpj\" due to failed sync: failed to sync pod \"vk/nginx-gpu-demo-1-fc769bdf6-5klpj\" in the provider: SDK.ServerError\nErrorCode: InternalError\nRecommend: \nRequestId: 960DB5E6-D421-4EB1-BEDF-C03D0055332F\nMessage: An unknown error occurred while processing your request." namespace= node=virtual-kubelet operatingSystem=Linux provider=alibabacloud time="2019-08-23T07:11:30Z" level=warning msg="skipping update of pod nginx-gpu-demo-1-fc769bdf6-5klpj as pod updates are not supported" namespace= node=virtual-kubelet operatingSystem=Linux provider=alibabacloud
kube-proxy and CoreDNS are scheduled to a VNode and fail to start. What do I do?
Kubernetes ignores node taints when scheduling kube-proxy and CoreDNS, so they can land on a VNode. To prevent this, add a nodeAffinity rule to the YAML for both components so they are never scheduled to virtual-kubelet nodes:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubeletNetworking
How do I change the ClusterDomain of an ECI pod?
Add the CLUSTER_DOMAIN environment variable to the container in the Virtual Kubelet component's Deployment. This updates ClusterDomain for all ECI pods created by that component. Submit a ticket to Alibaba Cloud technical support for assistance.
The nginx.ingress.kubernetes.io/auth-url annotation on my ACK Serverless ingress has no effect. Why?
ACK Serverless clusters use SLB-based ingress controllers, which provide load balancing but do not support URL authentication. The nginx.ingress.kubernetes.io/auth-url annotation has no effect in this cluster type.
If you need URL authentication, use a standard ACK cluster instead.
After upgrading my cluster, the service IP address can no longer be pinged. Why?
Before October 2020, service IP addresses were bound to virtual network interface controllers and could be pinged. Starting from October 2020, service IP addresses exist only in IP Virtual Server (IPVS) rules to support high concurrency. IPVS routes traffic by IP address and port number and does not process ICMP packets, so ping no longer works against service IPs.
Logging
I set the aliyun_logs_ environment variable, but no logs appear in Simple Log Service. Why?
Two common causes:
Short container runtime — If the application container finishes within 20 seconds of ECI startup, the container may exit and unmount the log volume before Simple Log Service (SLS) has a chance to collect the logs.
Incorrect log path — When you first configure the aliyun_logs_{Logstore name} environment variable on a pod, ECI automatically creates a Logstore and registers the log path in SLS. All subsequent pods must use the same path. If you use a different path, SLS cannot collect logs from those pods. To use a different path, change the Logstore name at the same time — ECI will create a new Logstore with the new path automatically.
Monitoring
Does Prometheus automatically collect metrics from ECI pods on virtual nodes?
Yes. Virtual nodes are compatible with real nodes, so both ARMS Prometheus and self-managed open source Prometheus automatically collect basic monitoring metrics from ECI pods on virtual nodes. No additional configuration is required.
For setup instructions, see Enable Prometheus Service or Use Prometheus to monitor an ACK cluster.