Files
doc-exports/docs/ucs/umn/ucs_01_0106.html
qiujiandong1 0a674cd795 UCS UMN initial update 20250523 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2026-01-13 13:39:08 +00:00

225 lines
42 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="ucs_01_0106"></a><a name="ucs_01_0106"></a>
<h1 class="topictitle1">Deployments</h1>
<div id="body8662426"><p id="ucs_01_0106__en-us_topic_0150272097_p8941161718914">A workload is an abstract model of a group of pods in Kubernetes. Workloads defined in Kubernetes include Deployments, StatefulSets, jobs, and DaemonSets.</p>
<div class="section" id="ucs_01_0106__en-us_topic_0150272097_section9568145263015"><h4 class="sectiontitle">Basic Concepts</h4><ul id="ucs_01_0106__en-us_topic_0150272097_ul47231377534"><li id="ucs_01_0106__en-us_topic_0150272097_li127238715314">Deployments: Pods are completely independent of each other and functionally identical. They feature auto scaling and rolling upgrade. Typical examples include Nginx and WordPress. For details on how to create a Deployment, see <a href="#ucs_01_0106__en-us_topic_0150272097_section4376174418545">Creating a Deployment</a>.</li><li id="ucs_01_0106__en-us_topic_0150272097_li062831612530">StatefulSets: Pods are not completely independent of each other. They have stable persistent storage and network identifiers, and feature orderly deployment, scale-in, and deletion. For example, MySQL-HA and etcd. For details on how to create a StatefulSet, see <a href="ucs_01_0136.html#ucs_01_0136__section311016411651">Creating a StatefulSet</a>.</li><li id="ucs_01_0106__en-us_topic_0150272097_li171182220224">DaemonSets: A DaemonSet runs a pod on each node in a cluster and ensures that there is only one pod. This works well for certain system-level applications, such as log collection and resource monitoring. For details on how to create a DaemonSet, see <a href="ucs_01_0137.html#ucs_01_0137__section15150683617">Creating a DaemonSet</a>.</li></ul>
</div>
<div class="section" id="ucs_01_0106__en-us_topic_0150272097_section16194164519394"><h4 class="sectiontitle">Relationship Between Workloads and Containers</h4><p id="ucs_01_0106__en-us_topic_0150272097_p581535411396">As shown in <a href="#ucs_01_0106__en-us_topic_0150272097_fig1801862479">Figure 1</a>, a workload controls one or more pods. A pod consists of one or more containers. Each container is created from a container image. Pods running Deployments are the same.</p>
<div class="fignone" id="ucs_01_0106__en-us_topic_0150272097_fig1801862479"><a name="ucs_01_0106__en-us_topic_0150272097_fig1801862479"></a><a name="en-us_topic_0150272097_fig1801862479"></a><span class="figcap"><b>Figure 1 </b>Relationship between workloads and containers</span><br><span><img id="ucs_01_0106__en-us_topic_0150272097_image154981156104512" src="en-us_image_0000001317877889.png"></span></div>
</div>
<div class="section" id="ucs_01_0106__en-us_topic_0150272097_section3891192610218"><h4 class="sectiontitle">Workload Lifecycle</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ucs_01_0106__en-us_topic_0150272097_table488465253420" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Status description</caption><thead align="left"><tr id="ucs_01_0106__en-us_topic_0150272097_row13888105212343"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.3.1.1"><p id="ucs_01_0106__en-us_topic_0150272097_p1788975203415">Status</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="75%" id="mcps1.3.4.2.2.3.1.2"><p id="ucs_01_0106__en-us_topic_0150272097_p788975211347">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ucs_01_0106__en-us_topic_0150272097_row14889152173415"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p1788905212343">Running</p>
</td>
<td class="cellrowborder" valign="top" width="75%" headers="mcps1.3.4.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p188914522345">All pods are running.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row12889195263417"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p1888915253412">Unready</p>
</td>
<td class="cellrowborder" valign="top" width="75%" headers="mcps1.3.4.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p12889152113418">All pods are in the pending state.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row12889195213419"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p6889135218347">Upgrading</p>
</td>
<td class="cellrowborder" valign="top" width="75%" headers="mcps1.3.4.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p18889052203414">After the upgrade operation is triggered, the workload is being upgraded.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row172011222121114"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p132017221115">Available</p>
</td>
<td class="cellrowborder" valign="top" width="75%" headers="mcps1.3.4.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p16202132212113">For a multi-pod Deployment, some pods are abnormal but at least one pod is available.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row1280465420481"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p198052054104811">Deleting</p>
</td>
<td class="cellrowborder" valign="top" width="75%" headers="mcps1.3.4.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p8805854104812">After the delete operation is triggered, the workload is being deleted.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ucs_01_0106__en-us_topic_0150272097_section4376174418545"><a name="ucs_01_0106__en-us_topic_0150272097_section4376174418545"></a><a name="en-us_topic_0150272097_section4376174418545"></a><h4 class="sectiontitle">Creating a Deployment</h4><ol id="ucs_01_0106__en-us_topic_0150272097_ol1969210191066"><li id="ucs_01_0106__en-us_topic_0150272097_li1835220361371"><span>(Optional) If you create a workload using the image pulled from SWR, push your image to SWR first. For details about how to push an image, see <span id="ucs_01_0106__ph1028219481421"><a href="https://docs.otc.t-systems.com/software-repository-container/umn/image_management/index.html" target="_blank" rel="noopener noreferrer">Image Management</a></span>. If you create a workload using an open source image, you do not need to push the image to SWR.</span></li><li id="ucs_01_0106__en-us_topic_0150272097_li32713413484"><span>On the cluster console, choose <strong id="ucs_01_0106__b1325495614513">Workloads</strong> &gt; <strong id="ucs_01_0106__b226355614513">Deployments</strong> and click <strong id="ucs_01_0106__b15263556115117">Create from Image</strong>.</span></li><li id="ucs_01_0106__en-us_topic_0150272097_li92727414481"><span>Configure basic information as described in <a href="#ucs_01_0106__en-us_topic_0150272097_table12741447488">Table 2</a>. The parameters marked with an asterisk (*) are mandatory.</span><p>
<div class="tablenoborder"><a name="ucs_01_0106__en-us_topic_0150272097_table12741447488"></a><a name="en-us_topic_0150272097_table12741447488"></a><table cellpadding="4" cellspacing="0" summary="" id="ucs_01_0106__en-us_topic_0150272097_table12741447488" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Basic workload parameters</caption><thead align="left"><tr id="ucs_01_0106__en-us_topic_0150272097_row52758419481"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.5.2.3.2.1.2.3.1.1"><p id="ucs_01_0106__en-us_topic_0150272097_p152759464816">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="77%" id="mcps1.3.5.2.3.2.1.2.3.1.2"><p id="ucs_01_0106__en-us_topic_0150272097_p3275134114811">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ucs_01_0106__en-us_topic_0150272097_row18415163712618"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p32763416485">*Workload Name</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p5276341485">Name of a workload, which must be unique.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row81437181202"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p514451811010">Cluster Name</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p323714215492">Cluster to which the workload belongs. You do not need to set this parameter.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row169810201307"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p19698152011011">*Namespace</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p12447336131710">In a single cluster, data in different namespaces is isolated from each other. This enables applications to share the Services of the same cluster without interfering each other. If no namespace is set, the <strong id="ucs_01_0106__en-us_topic_0150272097_b1845865472510">default</strong> namespace is used.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row165805182316"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p45913512317">*Pods</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p1042648123717">Number of pods in the workload. A workload can have one or more pods. You can set the number of pods. The default value is <strong id="ucs_01_0106__en-us_topic_0150272097_b186655123269">2</strong> and can be set to <strong id="ucs_01_0106__en-us_topic_0150272097_b5670012192616">1</strong>.</p>
<p id="ucs_01_0106__en-us_topic_0150272097_p17713926910">Each workload pod consists of the same containers. Configuring multiple pods for a workload ensures that the workload can still run properly even if a pod is faulty. If only one pod is used, a node or pod exception may cause service exceptions.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row1027719414818"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p1527715418485">Description</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p827734134817">Description of the workload.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row376310444417"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.3.2.1.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p57646446411">Time Zone Synchronization</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.3.2.1.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p1092661015512">If this parameter is enabled, the containers and the node use the same time zone, and disks of the hostPath type will be automatically added and listed in the <strong id="ucs_01_0106__b493491118540">Data Storage</strong> &gt; <strong id="ucs_01_0106__b5944151118546">Local Volumes</strong> area. Do not modify or delete the disks.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="ucs_01_0106__en-us_topic_0150272097_li182796474816"><span>Configure the container settings for the workload.</span><p><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p1349643241618">Multiple containers can be configured in a pod. You can click <span class="uicontrol" id="ucs_01_0106__uicontrol161031052135412"><b>Add Container</b></span> on the right to configure multiple containers for the pod.</p>
<div class="p" id="ucs_01_0106__p0191193914233"><ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul17496832191619"><li id="ucs_01_0106__li116712153577"><strong id="ucs_01_0106__b94094147511">Container Information</strong>: Click <span class="uicontrol" id="ucs_01_0106__uicontrol962811717555"><b>Add Container</b></span> on the right to configure multiple containers for the pod.<ul id="ucs_01_0106__ul19736182576"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li124961732141613"><strong id="ucs_01_0106__b205831935165113">Basic Info</strong>: See <a href="#ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_table6496632151617">Table 3</a>.
<div class="tablenoborder"><a name="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_table6496632151617"></a><a name="en-us_topic_0150272097_en-us_topic_0000001236922598_table6496632151617"></a><table cellpadding="4" cellspacing="0" summary="" id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_table6496632151617" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Basic information parameters</caption><thead align="left"><tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row15493183281617"><th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1"><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p1549353221618">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="77%" id="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2"><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p14937329164">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row54941932171614"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p44946321163">Container Name</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p149416326161">Name the container.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row1449443241617"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p1349419328168">Image Name</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p18494133231611">Click <span class="uicontrol" id="ucs_01_0106__uicontrol1332884513554"><b>Select Image</b></span> and select the image used by the container.</p>
<ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul04942324166"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li949416327167"><strong id="ucs_01_0106__b1345075112525">My Images</strong>: images in the image repository of the current region. If no image is available, click <strong id="ucs_01_0106__b5630195845515">Upload Image</strong> to upload an image.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li15494193251617"><strong id="ucs_01_0106__b1327311619564">Open Source Images</strong>: official images in the open source image repository.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li8494832201619"><strong id="ucs_01_0106__b14214630145812">Shared Images</strong>: private images shared by another account. For details, see <a href="https://docs.otc.t-systems.com/software-repository-container/umn/image_management/sharing_private_images.html#swr-01-0026" target="_blank" rel="noopener noreferrer">Sharing Private Images</a>.</li></ul>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row114951332161616"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p1949420327167">Image Tag</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p849593214168">Select the image tag to be deployed.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row94953325166"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p4495932171617">Pull Policy</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p6495132201614">Image update or pull policy. If you select <strong id="ucs_01_0106__b207281150185817">Always</strong>, the image is pulled from the image repository each time. If you do not select <strong id="ucs_01_0106__b2736150115812">Always</strong>, the existing image of the node is preferentially used. If the image does not exist in the node, it is pulled from the image repository.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row949513322166"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p16495153211617">CPU Quota</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul124951132141619"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li11495173271613"><strong id="ucs_01_0106__b9435161018591">Request</strong>: minimum number of CPU cores required by a container. The default value is 0.25 cores.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li749511321166"><strong id="ucs_01_0106__b16287142598">Limit</strong>: maximum number of CPU cores available for a container. Do not leave <strong id="ucs_01_0106__b151771865910">Limit</strong> unspecified. Otherwise, intensive use of container resources will occur and your workload may exhibit unexpected behavior.</li></ul>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row8495332131612"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p1549503210167">Memory Quota</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul13495183214164"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li13495632181612"><strong id="ucs_01_0106__b6580830155916">Request</strong>: minimum amount of memory required by a container. The default value is 512 MiB.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li1149573219162"><strong id="ucs_01_0106__b11302934185914">Limit</strong>: maximum amount of memory available for a container. When memory usage exceeds the specified memory limit, the container will be terminated.</li></ul>
<p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p17495932151616">For details about <strong id="ucs_01_0106__b18539244155917">Request</strong> and <strong id="ucs_01_0106__b10549164435915">Limit</strong> of CPU or memory, see <a href="ucs_01_0147.html">Setting Container Specifications</a>.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_row6496153291617"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p144951732161620">Init Container</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p15495183221618">Select whether to use the container as an init container.</p>
<p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p1749612322164">An init container is a special container that runs before app containers in a pod. For details, see <a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" target="_blank" rel="noopener noreferrer">Init Containers</a>.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row11416113105018"><td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p593433135012">Privileged Container</p>
</td>
<td class="cellrowborder" valign="top" width="77%" headers="mcps1.3.5.2.4.2.2.1.1.3.1.3.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p159344318502">Programs in a privileged container have certain privileges.</p>
<p id="ucs_01_0106__en-us_topic_0150272097_p10934163111508">If <strong id="ucs_01_0106__b3319181016914">Privileged Container</strong> is enabled, the container is assigned privileges. For example, privileged containers can manipulate network devices on the host machine and modify kernel parameters.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li18496143251618"><strong id="ucs_01_0106__b3495723791">Lifecycle</strong>: The lifecycle callback functions can be called in specific phases of the container. For example, if you want the container to perform a certain operation before stopping, set the corresponding function. Currently, lifecycle callback functions, such as <span class="keyword" id="ucs_01_0106__keyword1912842812194">startup</span>, <span class="keyword" id="ucs_01_0106__keyword1312822817196">post-start</span>, and <span class="keyword" id="ucs_01_0106__keyword012817284191">pre-stop</span> are provided. For details, see <a href="ucs_01_0148.html">Setting Container Lifecycle Parameters</a>.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li184967327169"><strong id="ucs_01_0106__b434314351116">Health Check</strong>: Set health check parameters to periodically check the health status of the container during container running. For details, see <a href="ucs_01_0149.html">Setting Health Check for a Container</a>.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li1496153217163"><strong id="ucs_01_0106__b146981533018">Environment Variable</strong>: Environment variables affect the way a running container will behave. Configuration items set by environment variables will not change if the pod lifecycle ends. For details, see <a href="ucs_01_0150.html">Setting Environment Variables</a>.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li17496203271612"><strong id="ucs_01_0106__b14524211539">Data Storage</strong>: Store container data using <strong id="ucs_01_0106__b1645202115315">Local Volumes</strong> and <strong id="ucs_01_0106__b144531121332">PersistentVolumeClaims (PVCs)</strong>. You are advised to use PVCs to store workload pod data on a cloud volume. If you store pod data on a local volume and a fault occurs on the node, the data cannot be restored. For details about container storage, see <a href="ucs_01_0112.html">Container Storage</a>.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li12496832181610"><strong id="ucs_01_0106__b1241241414">Security Context</strong>: Set container permissions to protect the system and other containers from being affected. Enter a user ID and the container will run with the user permissions you specify.</li></ul>
</li></ul>
<ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul34967321160"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li1449653291613"><strong id="ucs_01_0106__b320213135415">Image Access Credential</strong>: Select the credential for accessing the image repository. This credential is used only for accessing a private image repository. If the selected image is a public image, you do not need to select a secret. For details on how to create a secret, see <a href="ucs_01_0115.html">Creating a Secret</a>.</li></ul>
</div>
</p></li><li id="ucs_01_0106__en-us_topic_0150272097_li3580132418215"><span>(Optional) Click <span><img id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_image2992536141818" src="en-us_image_0000001317957925.png"></span> in the <strong id="ucs_01_0106__b13444931645">Service Settings</strong> area to configure a Service for the workload.</span><p><p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p16549542164">If your workload will be reachable to other workloads or public networks, add a Service to define the workload access type. The workload access type determines the network attributes of the workload. Workloads with different access types can provide different network capabilities. For details, see <a href="ucs_01_0110.html">Services</a>.</p>
<p id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_p126541354111616">You can also create a Service after creating a workload. For details, see <a href="ucs_01_0110.html#ucs_01_0110__en-us_topic_0000001258156072_section3959435152917">ClusterIP</a> and <a href="ucs_01_0110.html#ucs_01_0110__en-us_topic_0000001258156072_section16547755192910">NodePort</a>.</p>
<ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul16654125491616"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li17816191012341"><strong id="ucs_01_0106__b15641028759">Service Name</strong>: name of the Service to be added. It is customizable and must be unique.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li11711139341"><strong id="ucs_01_0106__b89421131155">Service Type</strong><ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul1131422123418"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li965455471618"><strong id="ucs_01_0106__b1925811401051">ClusterIP</strong>: The Service is only reachable from within the cluster.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li565410548166"><strong id="ucs_01_0106__b119584431858">NodePort</strong>: The Service can be accessed from any node in the cluster.</li><li id="ucs_01_0106__en-us_topic_0150272097_li9822151616549"><strong id="ucs_01_0106__b11665194613519">LoadBalancer</strong>: The workload is accessed from the public network using a load balancer.</li></ul>
</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li1124414713616"><strong id="ucs_01_0106__b569644811517">Service Affinity</strong> (for NodePort and LoadBalancer only)<ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul20813557153920"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li933485711396"><strong id="ucs_01_0106__b2573187969">Cluster-level</strong>: The IP addresses and access ports of all nodes in a cluster can be used to access the workloads associated with the Service. However, performance loss is introduced due to hops, and source IP addresses cannot be obtained.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li202984322404"><strong id="ucs_01_0106__b243817201611">Node-level</strong>: Only the IP address and access port of the node where the workload is located can be used to access the workload associated with the Service. Service access will not cause performance loss due to route redirection, and the source IP address of the client can be obtained.</li></ul>
</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li355492917345"><strong id="ucs_01_0106__b861291761">Port</strong><ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul9262141163412"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li25641447141"><strong id="ucs_01_0106__b148981530765">Protocol</strong>: Select <strong id="ucs_01_0106__b48989302063">TCP</strong> or <strong id="ucs_01_0106__b58994301962">UDP</strong>.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li1018433010388"><strong id="ucs_01_0106__b184330374614">Service Port</strong>: Port mapped to the container port at the cluster-internal IP address. The application can be accessed at <em id="ucs_01_0106__i1543923715613">&lt;cluster-internal IP address&gt;</em>:<em id="ucs_01_0106__i44398376617">&lt;access port&gt;</em>. The port number range is 165535.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li142471635131918"><strong id="ucs_01_0106__b143464219617">Container Port</strong>: Port on which the workload listens, defined in the container image. For example, the Nginx application listens on port 80 (container port).</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li419736201616"><strong id="ucs_01_0106__b8150552468">Node Port</strong> (for NodePort only): Port to which the container port will be mapped when the node private IP address is used for accessing the application. The port number range is 3000032767. You are advised to select <strong id="ucs_01_0106__b1315619521169">Auto</strong>.<ul id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_ul12255617963"><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li537910611618"><strong id="ucs_01_0106__b476311561962">Auto</strong>: The system automatically assigns a port number.</li><li id="ucs_01_0106__en-us_topic_0150272097_en-us_topic_0000001236922598_li7962160113720"><strong id="ucs_01_0106__b14117115716">Custom</strong>: Specify a fixed node port. The port number range is 3000032767. Ensure that the port is unique in a cluster.</li></ul>
</li></ul>
</li><li id="ucs_01_0106__li1091212408289"><strong id="ucs_01_0106__b366212913719">Annotation</strong>: The key-value pair format is supported. Configure annotations based on your service and vendor requirements and then click <span class="uicontrol" id="ucs_01_0106__uicontrol12671396715"><b>Add</b></span>.</li></ul>
</p></li><li id="ucs_01_0106__en-us_topic_0150272097_li36451516615"><span>(Optional) Click <span class="uicontrol" id="ucs_01_0106__uicontrol1263617211671"><b>Expand</b></span> to set advanced settings for the workload.</span><p><ul id="ucs_01_0106__en-us_topic_0000001236922598_ul1965505491611"><li id="ucs_01_0106__en-us_topic_0000001236922598_li10655115416169"><strong id="ucs_01_0106__b88501738877">Upgrade</strong>: upgrade mode of the Deployment, including <strong id="ucs_01_0106__b28568385714">Replace upgrade</strong> and <strong id="ucs_01_0106__b1985712381077">Rolling upgrade</strong>. For details, see <a href="ucs_01_0151.html">Configuring a Workload Upgrade Policy</a>.<ul id="ucs_01_0106__en-us_topic_0000001236922598_ul176550546160"><li id="ucs_01_0106__en-us_topic_0000001236922598_li66556543166"><strong id="ucs_01_0106__b107681823144415">Rolling upgrade</strong>: An old pod is gradually replaced with a new pod. During the upgrade, service traffic is evenly distributed to the old and new pods to ensure service continuity.</li><li id="ucs_01_0106__en-us_topic_0000001236922598_li1065555418169"><span class="parmvalue" id="ucs_01_0106__parmvalue74302046164613"><b>Replace upgrade</b></span>: Old pods are deleted before new pods are created. Services will be interrupted during a replace upgrade.</li></ul>
</li><li id="ucs_01_0106__en-us_topic_0000001236922598_li265515541162"><strong id="ucs_01_0106__b1112135964615">Scheduling</strong>: You can set affinity and anti-affinity to implement planned scheduling for pods. For details, see <a href="ucs_01_0152.html">Scheduling Policy (Affinity/Anti-affinity)</a>.</li><li id="ucs_01_0106__en-us_topic_0000001236922598_li19655105431615"><strong id="ucs_01_0106__b1884716126479">Labels and Annotations</strong>: You can click <span class="uicontrol" id="ucs_01_0106__uicontrol15858151213471"><b>Confirm</b></span> to add a label or annotation for the pod. The key of the new label or annotation cannot be the same as that of an existing one.</li><li id="ucs_01_0106__en-us_topic_0000001236922598_li865595401619"><strong id="ucs_01_0106__b1791908164813">Toleration</strong>: When the node where the workload pods are located is unavailable for the specified amount of time, the pods will be rescheduled to other available nodes. By default, the toleration time window is 300s.<ul id="ucs_01_0106__ul5552163220296"><li id="ucs_01_0106__li339442919292">Using both taints and tolerations allows (not forcibly) the pod to be scheduled to a node with the matching taints, and controls the pod eviction policies after the node where the pod is located is tainted. For details, see <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/" target="_blank" rel="noopener noreferrer">Example Tutorial</a>.</li><li id="ucs_01_0106__li6547103283011">Click <span><img id="ucs_01_0106__image11379188103414" src="en-us_image_0000001620130045.png"></span> under <strong id="ucs_01_0106__b14252650151118">Taints and Tolerations</strong> to add a policy. For details about related parameters, see <a href="ucs_01_0399.html">Tolerance Policies</a>.</li></ul>
</li></ul>
</p></li><li id="ucs_01_0106__en-us_topic_0150272097_li939210312512"><span>After the configuration is complete, click <strong id="ucs_01_0106__en-us_topic_0150272097_b59584810281">Create Workload</strong>. You can view the Deployment status in the Deployment list.</span><p><p id="ucs_01_0106__en-us_topic_0150272097_p61509501438">If the Deployment is in the <span class="uicontrol" id="ucs_01_0106__en-us_topic_0150272097_uicontrol3808193419321"><b>Running</b></span> status, the Deployment is successfully created. </p>
</p></li></ol>
</div>
<div class="section" id="ucs_01_0106__en-us_topic_0150272097_section167081723161419"><h4 class="sectiontitle">Related Operations</h4><div class="p" id="ucs_01_0106__en-us_topic_0150272097_p98641861268">On the cluster console, you can also perform the operations described in <a href="#ucs_01_0106__en-us_topic_0150272097_table1619535674020">Table 4</a>.
<div class="tablenoborder"><a name="ucs_01_0106__en-us_topic_0150272097_table1619535674020"></a><a name="en-us_topic_0150272097_table1619535674020"></a><table cellpadding="4" cellspacing="0" summary="" id="ucs_01_0106__en-us_topic_0150272097_table1619535674020" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Related operations</caption><thead align="left"><tr id="ucs_01_0106__en-us_topic_0150272097_row16740630125918"><th align="left" class="cellrowborder" valign="top" width="32%" id="mcps1.3.6.2.2.2.3.1.1"><p id="ucs_01_0106__en-us_topic_0150272097_p17740730115914">Operation</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.6.2.2.2.3.1.2"><p id="ucs_01_0106__en-us_topic_0150272097_p1574018303592">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ucs_01_0106__en-us_topic_0150272097_row7185670013"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p122351921135812">Creating a workload from a YAML file</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p1823510218585">Click <span class="uicontrol" id="ucs_01_0106__uicontrol980903135218"><b>Create from YAML</b></span> in the upper right corner to create a workload from an existing YAML file.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row1246161918313"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p187045297314">Viewing pod details</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><div class="p" id="ucs_01_0106__en-us_topic_0150272097_p1633332811516">Click the name of a workload. You can view pod details on the <strong id="ucs_01_0106__b29251148145415">Pods</strong> tab.<ul id="ucs_01_0106__en-us_topic_0150272097_ul759411917184"><li id="ucs_01_0106__en-us_topic_0150272097_li175949911818"><strong id="ucs_01_0106__b177822059205415">View Events</strong>: You can set search criteria, such as the time segment during which an event is generated or the event name, to view related events.</li><li id="ucs_01_0106__en-us_topic_0150272097_li9561101941817"><strong id="ucs_01_0106__b596815612553">View Container</strong>: You can view the container name, status, image, and restarts of the pod.</li><li id="ucs_01_0106__en-us_topic_0150272097_li1484724111020"><strong id="ucs_01_0106__b11727171025517">View YAML</strong>: You can view the YAML file of the pod.</li></ul>
</div>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row133318512019"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p163331851201">Editing a YAML file</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p1633314512016">Click <strong id="ucs_01_0106__b8495184010596">Edit YAML</strong> in the row where the target workload resides to edit its YAML file.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row12740103016592"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p4740153012590">Upgrade</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><ol id="ucs_01_0106__en-us_topic_0150272097_ol187401330145919"><li id="ucs_01_0106__en-us_topic_0150272097_li57402030165918">Click <span class="uicontrol" id="ucs_01_0106__uicontrol17543154715715"><b>Upgrade</b></span> in the row where the target workload resides.</li><li id="ucs_01_0106__en-us_topic_0150272097_li20740730145912">Modify information about the workload.</li><li id="ucs_01_0106__en-us_topic_0150272097_li15740930135911">Click <span class="uicontrol" id="ucs_01_0106__uicontrol1116871218583"><b>Upgrade Workload</b></span> to submit the modified information.</li></ol>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row739833313135"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p153981433161314">Rollback</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p113981833191310">Choose <strong id="ucs_01_0106__b74111320104112">More</strong> &gt; <span class="uicontrol" id="ucs_01_0106__uicontrol171410229588"><b>Roll Back</b></span> in the row where the target workload resides, and select the target version for rollback.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row728515411134"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p12285134114139">Redeploy</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p478501212011">Choose <strong id="ucs_01_0106__b688162913588">More</strong> &gt; <strong id="ucs_01_0106__b2888132995812">Redeploy</strong> in the row where the target workload resides, and click <span class="uicontrol" id="ucs_01_0106__uicontrol1889192905819"><b>Yes</b></span> in the dialog box displayed. Redeployment will restart all pods in the workload.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row4963114871320"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p2963648101313">Disabling upgrade</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p12511432101412">Choose <strong id="ucs_01_0106__b6832951205810">More</strong> &gt; <strong id="ucs_01_0106__b7839195185814">Disable Upgrade</strong> in the row where the workload resides, and click <span class="uicontrol" id="ucs_01_0106__uicontrol10839175135817"><b>Yes</b></span> in the dialog box displayed.</p>
<ul id="ucs_01_0106__en-us_topic_0150272097_ul14609141718144"><li id="ucs_01_0106__en-us_topic_0150272097_li523611228141">After a workload is marked "Upgrade disabled", its upgrade will not be applied to the pods.</li><li id="ucs_01_0106__en-us_topic_0150272097_li8609117171412">Any ongoing rolling upgrade will be suspended.</li></ul>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row263419121693"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p136342121894">Delete</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><p id="ucs_01_0106__en-us_topic_0150272097_p9634111213912">Choose <strong id="ucs_01_0106__b15500151598">More</strong> &gt; <strong id="ucs_01_0106__b165811518596">Delete</strong> in the row where the workload resides, and click <span class="uicontrol" id="ucs_01_0106__uicontrol159515195915"><b>Yes</b></span> in the dialog box displayed.</p>
</td>
</tr>
<tr id="ucs_01_0106__en-us_topic_0150272097_row874013304597"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.6.2.2.2.3.1.1 "><p id="ucs_01_0106__en-us_topic_0150272097_p17740330175915">Deleting workloads in batches</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.6.2.2.2.3.1.2 "><ol id="ucs_01_0106__en-us_topic_0150272097_ol2018182981712"><li id="ucs_01_0106__en-us_topic_0150272097_li4181182991710">Select the target workloads to be deleted.</li><li id="ucs_01_0106__en-us_topic_0150272097_li181811529181711">Click <span class="uicontrol" id="ucs_01_0106__uicontrol1576813745910"><b>Delete</b></span> in the upper left corner.</li><li id="ucs_01_0106__en-us_topic_0150272097_li9181929161712">Click <span class="uicontrol" id="ucs_01_0106__uicontrol1395174065911"><b>Yes</b></span>.</li></ol>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ucs_01_0105.html">Workload Management</a></div>
</div>
</div>