All Products
Search
Document Center

Container Service for Kubernetes:Manage pods

Last Updated:Dec 05, 2023

Pods are the smallest deployable units in Kubernetes. A pod runs an instance of an independent application in Kubernetes. Each pod contains one or more containers that are tightly coupled. This topic describes how to view and modify pod configurations, and scale pods in the Container Service for Kubernetes (ACK) console.

Prerequisites

A workload is created. For more information, see Workloads.

View pods

View pod details

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

  2. On the Clusters page, click the name of the cluster that you want to manage and choose Workloads > Pods in the left-side navigation pane.

  3. On the Pods page, find the pod that you want to view and click View Details in the Actions column.

    Note

    On the Pods page, you can modify and delete pods. For pods that are created by using a Deployment, we recommend that you use the Deployment to manage the pods.

    The following table describes the status of pods.

    Status

    Description

    Initialized

    All init containers are started.

    Ready

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

    ContainersReady

    All containers in the pod are ready.

    PodScheduled

    The pod has been scheduled to a node.

    For more information, see Pod lifecycle.

View pod log

On the Pods page, find the pod that you want to manage, and then click Logs on the right side of the page to view the log data.

Filter pods

On the Pods page, you can filter pods by name, label, pod IP address, and node IP address. You can also filter pods by keys and values that are displayed in the Label column.pod

Pod diagnostics

On the Pods page, find the pod that you want to diagnose and click Diagnose in the Actions column. For more information, see Work with cluster diagnostics.

Modify the upper limit and lower limit of CPU and memory resources for pods

After you create an application, you can modify the upper limit and lower limit of CPU and memory resources for the application pods. In this example, a Deployment is used.

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

  2. On the Clusters page, click the name of the cluster that you want to manage and choose Workloads > Deployments in the left-side navigation pane.

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

  4. On the Edit page, modify the upper limit and lower limit of CPU and memory resources based on your requirements. Then, click Update.

Modify pod configurations

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

  2. On the Clusters page, click the name of the cluster that you want to manage and choose Workloads > Pods in the left-side navigation pane.

  3. On the Pods page, find the pod that you want to modify and click Edit in the Actions column.

  4. In the Edit YAML dialog box, modify the configurations and click Update.

Manually scale pods for an application

After an application is created, you can scale the pods that are provisioned for the application based on your business requirements.

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

  2. On the Clusters page, click the name of the cluster that you want to manage and choose Workloads > Deployments in the left-side navigation pane.

  3. Select the namespace where the Deployment is deployed, find the Deployment, and then click Scale in the Actions column.
  4. In the Scale dialog box, set Desired Number of Pods to 4 and click OK.

    Note

    By default, Deployments are updated based on the rollingUpdate strategy. This ensures that a minimum number of pods are available during the update. You can change this number in the YAML file.