View, configure, and scale pods

更新时间:
复制 MD 格式

A pod is the smallest deployable unit in Kubernetes and represents an independent application instance, which may consist of one container or several tightly coupled containers. You can view pods, modify pod configurations, and manually scale applications in the ACK console.

Prerequisites

A workload is created.

View pods

View pod details

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Workloads > Pods.

  3. On the Pods page, find the pod and click Details in the Actions column.

    Note

    You can modify and delete pods on this page. For Deployment-created pods, manage them through the Deployment.

    The following table lists pod statuses.

    Status

    Description

    Initialized

    All init containers are started.

    Ready

    The pod can serve requests and is added to the load balancing pools of all matching services.

    ContainersReady

    All containers in the pod are ready.

    PodScheduled

    The pod is scheduled to a node.

    See Pod Lifecycle.

View pod logs

On the Pods page, find the pod and click Logs in the Actions column.

Filter pods

On the Pods page, filter pods by name, label, pod IP address, or node IP address. To filter by label, click the filter icon in the Label column header, enter the key and value, and click OK.

Diagnose a pod

On the Pods page, find the pod and click Diagnose in the Actions column. See Use cluster diagnostics.

Set CPU and memory requests and limits

Adjust CPU and memory requests and limits for application pods. This example uses a Deployment.

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Workloads > Deployments.

  3. On the Deployments page, select a namespace from the Namespace drop-down list. Find the application and click Edit in the Actions column.

  4. Set CPU and memory requests and limits in the Limit and Required Resources sections, and click Update.

    Important

    The maximum number of pods per node depends on the cluster network plug-in. See the Compare Terway modes section in the Work with Terway topic.

Modify pod configurations

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Workloads > Pods.

  3. On the Pods page, find the pod and click Edit in the Actions column.

  4. Update the pod configuration and click Update.

Scale pods manually

Scale the number of pods for a Deployment to match your business needs.

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Workloads > Deployments.

  3. Select a namespace, find the Deployment that you want to manage, and click Scale in the Actions column.

  4. In the dialog box, set the desired number of pods to 4 and click OK.

    Note

    Deployments use rollingUpdate mode by default to keep a minimum number of pods available during updates. Modify this minimum in the Deployment template.

References