All Products
Search
Document Center

Container Service for Kubernetes:Configure a public IP address for a pod

Last Updated:Apr 01, 2024

If your pod needs to access the Internet, you must configure a public IP address for the pod. This topic describes how to configure a public IP address for a pod.

You can configure a pod to access the Internet through an elastic IP address (EIP) or an Internet NAT gateway. The following section describes the differences between the two methods:

  • Use an EIP: Container Service for Kubernetes (ACK) associates an EIP with the IP address of the pod.

  • Use an Internet NAT gateway: You must configure SNAT entries for the vSwitch that is used by the pod. A vSwitch is used by a group of pods. After you configure SNAT entries for a vSwitch, the pods that use the vSwitch can access the Internet. For more information about how to configure SNAT entries for a vSwitch, see Create and manage SNAT entries.

image

The following section describes the operations required by the two methods: