From 04a53b8ad09775bb65896c8db7dac03d9f5e26d9 Mon Sep 17 00:00:00 2001 From: Soumik Majumder Date: Sat, 16 Oct 2021 21:59:12 +0530 Subject: [PATCH] Add Pod creation example in k8s.io/docs/concepts/workloads/pods/ --- content/en/docs/concepts/workloads/pods/_index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/en/docs/concepts/workloads/pods/_index.md b/content/en/docs/concepts/workloads/pods/_index.md index 7246536eb0..f984942d57 100644 --- a/content/en/docs/concepts/workloads/pods/_index.md +++ b/content/en/docs/concepts/workloads/pods/_index.md @@ -48,6 +48,21 @@ with shared namespaces and shared filesystem volumes. ## Using Pods +The following is an example of a Pod which consists of a container running the image `nginx:1.14.2`. + +{{< codenew file="pods/simple-pod.yaml" >}} + +To create the Pod shown above, run the following command: +```shell +kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml +``` + +Pods are generally not created directly and are created using workload resources. +See [Working with Pods](#working-with-pods) for more information on how Pods are used +with workload resources. + +### Workload resources for managing pods + Usually you don't need to create Pods directly, even singleton Pods. Instead, create them using workload resources such as {{< glossary_tooltip text="Deployment" term_id="deployment" >}} or {{< glossary_tooltip text="Job" term_id="job" >}}. If your Pods need to track state, consider the