From 3a2a59c3e36247c63e8ba48012bf3ed1459cc595 Mon Sep 17 00:00:00 2001 From: diguage Date: Thu, 26 Sep 2019 06:15:05 +0800 Subject: [PATCH] clean up the environment (#16430) --- .../manage-resources/cpu-default-namespace.md | 8 ++++++++ .../manage-resources/memory-default-namespace.md | 8 ++++++++ .../configure-persistent-volume-storage.md | 16 ++++++++++++++++ .../configure-pod-container/security-context.md | 11 +++++++++++ 4 files changed, 43 insertions(+) diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace.md index df5ec46de5298..65a91a3538ed7 100644 --- a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace.md +++ b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace.md @@ -155,6 +155,14 @@ Here are two of the restrictions that a resource quota imposes on a namespace: If a Container does not specify its own CPU limit, it is given the default limit, and then it can be allowed to run in a namespace that is restricted by a quota. +## Clean up + +Delete your namespace: + +```shell +kubectl delete namespace default-cpu-example +``` + {{% /capture %}} {{% capture whatsnext %}} diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md index 197d61171734e..bb5070bc98d92 100644 --- a/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md +++ b/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md @@ -162,6 +162,14 @@ Here are two of the restrictions that a resource quota imposes on a namespace: If a Container does not specify its own memory limit, it is given the default limit, and then it can be allowed to run in a namespace that is restricted by a quota. +## Clean up + +Delete your namespace: + +```shell +kubectl delete namespace default-mem-example +``` + {{% /capture %}} {{% capture whatsnext %}} diff --git a/content/en/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md b/content/en/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md index 3f30563b31840..7b15ad46d1070 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md +++ b/content/en/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md @@ -160,6 +160,22 @@ hostPath volume: Hello from Kubernetes storage +## Clean up + +Delete the Pod, the PersistentVolumeClaim and the PersistentVolume: + +```shell +kubectl delete pod task-pv-pod +kubectl delete pvc task-pv-claim +kubectl delete pv task-pv-volume +``` + +Remove the file: + +```shell +sudo rm -rf /mnt/data +``` + {{% /capture %}} diff --git a/content/en/docs/tasks/configure-pod-container/security-context.md b/content/en/docs/tasks/configure-pod-container/security-context.md index f3b8be8d371e7..bc1fc3a8272bf 100644 --- a/content/en/docs/tasks/configure-pod-container/security-context.md +++ b/content/en/docs/tasks/configure-pod-container/security-context.md @@ -353,6 +353,17 @@ label given to all Containers in the Pod as well as the Volumes. After you specify an MCS label for a Pod, all Pods with the same label can access the Volume. If you need inter-Pod protection, you must assign a unique MCS label to each Pod. {{< /warning >}} +## Clean up + +Delete the Pod: + +```shell +kubectl delete pod security-context-demo +kubectl delete pod security-context-demo-2 +kubectl delete pod security-context-demo-3 +kubectl delete pod security-context-demo-4 +``` + {{% /capture %}} {{% capture whatsnext %}}