Serverless Kubernetes Container Service Supports Mounting EIPs with Pods

By Xianwei

Recently, Alibaba Cloud serverless Container Service for Kubernetes added support for mounting elastic IP addresses (EIPs) with pods. This feature further simplifies the deployment of some serverless container applications and service access.

  • A single pod can access public networks without creating VPC NAT gateways.
  • A single pod can also expose public network services without creating services.
  • Pods and EIPs can be bound in a more flexible and dynamic way.

Currently Serverless Kubernetes supports two methods of mounting EIPs: automatically assigning an EIP or specifying an EIP instance.

Method 1: Automatically Assigning an Elastic IP Address

When the “” annotation is set to “true”, Serverless Kubernetes automatically assigns an EIP to this pod and binds that IEP to the pod


Create a pod:

View the IP address of the pod:

The Annotations of the pod shows the assigned EIP, which can be used to directly access that pod.

Because an EIP is dynamically assigned in this method, the lifecycle of the EIP is the same as that of the pod. When a pod is deleted, the EIP dynamically assigned to that pod is also deleted.

Note that if you are creating a Deployment, each pod in that Deployment will mount a different EIP. Please perform this action with caution.

Method 2: Specifying the ID of an Elastic IP Address Instance

Purchase an EIP in the EIP console first.

Set the “” annotation of the pod to an EIP instance ID:

Create a pod:

Access the pod by using the EIP:

In this method, when a pod is deleted, the pod and the EIP are unbound. When the pod is re-created, the EIP are bound to the pod again.

About Container Service for Kubernetes

Alibaba Cloud Container Service for Kubernetes provides enterprise-level high-performance and flexible management of Kubernetes containerized applications throughout the application lifecycle. This service simplifies cluster creation and expansion and integrates Alibaba Cloud capabilities in virtualization, storage, network, and security, providing an improved running environment for Kubernetes containerized applications.

Log on to the Container Service Console and experiment with this service for free at:


Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.