Skip to content

Commit c2a0784

Browse files
committed
Adding breakdown of deploying specifications in YAML manifest file to the Kubernetes core concepts doc
1 parent f084d0e commit c2a0784

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

articles/aks/concepts-clusters-workloads.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Concepts - Kubernetes basics for Azure Kubernetes Services (AKS)
33
description: Learn the basic cluster and workload components of Kubernetes and how they relate to features in Azure Kubernetes Service (AKS)
44
services: container-service
55
ms.topic: conceptual
6-
ms.date: 03/05/2020
6+
ms.date: 10/31/2022
77

88
---
99

@@ -196,7 +196,7 @@ Most stateless applications in AKS should use the deployment model rather than s
196196
197197
You don't want to disrupt management decisions with an update process if your application requires a minimum number of available instances. *Pod Disruption Budgets* define how many replicas in a deployment can be taken down during an update or node upgrade. For example, if you have *five (5)* replicas in your deployment, you can define a pod disruption of *4 (four)* to only allow one replica to be deleted or rescheduled at a time. As with pod resource limits, best practice is to define pod disruption budgets on applications that require a minimum number of replicas to always be present.
198198
199-
Deployments are typically created and managed with `kubectl create` or `kubectl apply`. Create a deployment by defining a manifest file in the YAML format.
199+
Deployments are typically created and managed with `kubectl create` or `kubectl apply`. Create a deployment by defining a manifest file in the YAML format.
200200

201201
The following example creates a basic deployment of the NGINX web server. The deployment specifies *three (3)* replicas to be created, and requires port *80* to be open on the container. Resource requests and limits are also defined for CPU and memory.
202202

@@ -229,6 +229,32 @@ spec:
229229
memory: 256Mi
230230
```
231231

232+
A breakdown of the deployment specifications in the YAML manifest file is as follows:
233+
234+
| Specification | Description |
235+
| ----------------- | ------------- |
236+
| `.apiVersion` | Specifies the API group and API resource you want to use when creating the resource. |
237+
| `.kind` | Specifies the type of resource you want to create. |
238+
| `.metadata.name` | Specifies the image to run. This file will run the *nginx* image from Docker Hub. |
239+
| `.spec.replicas` | Specifies how many pods to create. This file will create three deplicated pods. |
240+
| `.spec.selector` | Specifies which pods will be affected by this deployment. |
241+
| `.spec.selector.matchLabels` | Contains a map of *{key, value}* pairs that allows the deployment to find and manage the created pods. |
242+
| `.spec.selector.matchLabels.app` | Has to match `.spec.template.metadata.labels`. |
243+
| `.spec.template.labels` | Specifies the *{key, value}* pairs attached to the object. |
244+
| `.spec.template.app` | Has to match `.spec.selector.matchLabels`. |
245+
| `.spec.spec.containers` | Specifies the list of containers belonging to the pod. |
246+
| `.spec.spec.containers.name` | Specifies the name of the container specified as a DNS label. |
247+
| `.spec.spec.containers.image` | Specifies the container image name. |
248+
| `.spec.spec.containers.ports` | Specifies the list of ports to expose from the container. |
249+
| `.spec.spec.containers.ports.containerPort` | Specifies the number of port to expose on the pod's IP address. |
250+
| `.spec.spec.resources` | Specifies the compute resources required by the container. |
251+
| `.spec.spec.resources.requests` | Specifies the minimum amount of compute resources required. |
252+
| `.spec.spec.resources.requests.cpu` | Specifies the minimum amount of CPU required. |
253+
| `.spec.spec.resources.requests.memory` | Specifies the minimum amount of memory required. |
254+
| `.spec.spec.resources.limits` | Specifies the maximum amount of compute resources allowed. This limit is enforced by the kubelet. |
255+
| `.spec.spec.resources.limits.cpu` | Specifies the maximum amount of CPU allowed. This limit is enforced by the kubelet. |
256+
| `.spec.spec.resources.limits.memory` | Specifies the maximum amount of memory allowed. This limit is enforced by the kubelet. |
257+
232258
More complex applications can be created by including services (such as load balancers) within the YAML manifest.
233259

234260
For more information, see [Kubernetes deployments][kubernetes-deployments].

0 commit comments

Comments
 (0)