From 7c4e01887b0b64008d82298ff70d3b1b56e06aff Mon Sep 17 00:00:00 2001 From: Cody Clark Date: Thu, 17 Aug 2017 16:19:24 -0700 Subject: [PATCH] Callouts and other small formatting (#5022) * Removing Extra Spaces Issue 4602 | Configure Pods and Containers * Update security-context.md Adding callouts * Update security-context.md * Adding callout and fixing code block * Removing extra space * Adding callout * Addling callouts * Update assign-cpu-resource.md * Adding callout * Update configure-persistent-volume-storage.md * Update configure-service-account.md * Update quality-service-pod.md * Update security-context.md --- .../configure-pod-container/assign-cpu-resource.md | 3 ++- docs/tasks/configure-pod-container/configmap.md | 3 ++- .../configure-persistent-volume-storage.md | 1 + .../configure-pod-configmap.md | 8 ++++++-- .../configure-pod-initialization.md | 2 +- .../configure-projected-volume-storage.md | 4 ++-- .../configure-service-account.md | 9 ++++++--- .../configure-pod-container/quality-service-pod.md | 3 ++- .../configure-pod-container/security-context.md | 14 ++++++-------- 9 files changed, 28 insertions(+), 19 deletions(-) diff --git a/docs/tasks/configure-pod-container/assign-cpu-resource.md b/docs/tasks/configure-pod-container/assign-cpu-resource.md index 6988d5d529..3273567528 100644 --- a/docs/tasks/configure-pod-container/assign-cpu-resource.md +++ b/docs/tasks/configure-pod-container/assign-cpu-resource.md @@ -119,10 +119,11 @@ Recall that by setting `-cpu "2"`, you configured the Container to attempt to us But the Container is only being allowed to use about 1 cpu. The Container's CPU use is being throttled, because the Container is attempting to use more CPU resources than its limit. -Note: There's another possible explanation for the CPU throttling. The Node might not have +**Note:** There's another possible explanation for the CPU throttling. The Node might not have enough CPU resources available. Recall that the prerequisites for this exercise require that each of your Nodes has at least 1 cpu. If your Container is running on a Node that has only 1 cpu, the Container cannot use more than 1 cpu regardless of the CPU limit specified for the Container. +{: .note} ## CPU units diff --git a/docs/tasks/configure-pod-container/configmap.md b/docs/tasks/configure-pod-container/configmap.md index 508f32e2e3..352ea85c11 100644 --- a/docs/tasks/configure-pod-container/configmap.md +++ b/docs/tasks/configure-pod-container/configmap.md @@ -223,7 +223,8 @@ metadata: ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. The ConfigMap API resource stores configuration data as key-value pairs. The data can be consumed in pods or provide the configurations for system components such as controllers. ConfigMap is similar to [Secrets](/docs/concepts/configuration/secret/), but provides a means of working with strings that don't contain sensitive information. Users and system components alike can store configuration data in ConfigMap. -Note: ConfigMaps should reference properties files, not replace them. Think of the ConfigMap as representing something similar to the Linux `/etc` directory and its contents. For example, if you create a [Kubernetes Volume](/docs/concepts/storage/volumes/) from a ConfigMap, each data item in the ConfigMap is represented by an individual file in the volume. +**Note:** ConfigMaps should reference properties files, not replace them. Think of the ConfigMap as representing something similar to the Linux `/etc` directory and its contents. For example, if you create a [Kubernetes Volume](/docs/concepts/storage/volumes/) from a ConfigMap, each data item in the ConfigMap is represented by an individual file in the volume. +{: .note} The ConfigMap's `data` field contains the configuration data. As shown in the example below, this can be simple -- like individual properties defined using `--from-literal` -- or complex -- like configuration files or JSON blobs defined using `--from-file`. diff --git a/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md b/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md index f4170b7a41..a396c65c90 100644 --- a/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md +++ b/docs/tasks/configure-pod-container/configure-persistent-volume-storage.md @@ -188,6 +188,7 @@ each Container. **Note**: When a Pod consumes a PersistentVolume, the GIDs associated with the PersistentVolume are not present on the Pod resource itself. +{: .note} {% endcapture %} diff --git a/docs/tasks/configure-pod-container/configure-pod-configmap.md b/docs/tasks/configure-pod-container/configure-pod-configmap.md index b8d711d8cb..b0c26d8231 100644 --- a/docs/tasks/configure-pod-container/configure-pod-configmap.md +++ b/docs/tasks/configure-pod-container/configure-pod-configmap.md @@ -108,7 +108,8 @@ This page provides a series of usage examples demonstrating how to configure Pod ## Configure all key-value pairs in a ConfigMap as Pod environment variables -Note: This functionality is available to users running Kubernetes v1.6 and later. + **Note:** This functionality is available to users running Kubernetes v1.6 and later. + {: .note} 1. Create a ConfigMap containing multiple key-value pairs. @@ -299,7 +300,10 @@ When a ConfigMap already being consumed in a volume is updated, projected keys a 1. Kubelet doesn't support the use of ConfigMaps for pods not found on the API server. This includes every pod created using kubectl or indirectly via a replication controller. - It does not include pods created via the Kubelet's `--manifest-url` flag, `--config` flag, or the Kubelet REST API. (Note: these are not commonly-used ways to create pods.) + It does not include pods created via the Kubelet's `--manifest-url` flag, `--config` flag, or the Kubelet REST API. + + **Note:** These are not commonly-used ways to create pods. + {: .note} {% endcapture %} diff --git a/docs/tasks/configure-pod-container/configure-pod-initialization.md b/docs/tasks/configure-pod-container/configure-pod-initialization.md index f159344b24..be18f82e4d 100644 --- a/docs/tasks/configure-pod-container/configure-pod-initialization.md +++ b/docs/tasks/configure-pod-container/configure-pod-initialization.md @@ -34,7 +34,7 @@ shared Volume at `/work-dir`, and the application container mounts the shared Volume at `/usr/share/nginx/html`. The init container runs the following command and then terminates: - wget -O /work-dir/index.html http://kubernetes.io + wget -O /work-dir/index.html http://kubernetes.io Notice that the init container writes the `index.html` file in the root directory of the nginx server. diff --git a/docs/tasks/configure-pod-container/configure-projected-volume-storage.md b/docs/tasks/configure-pod-container/configure-projected-volume-storage.md index 5cb3153121..77ad75a55a 100644 --- a/docs/tasks/configure-pod-container/configure-projected-volume-storage.md +++ b/docs/tasks/configure-pod-container/configure-projected-volume-storage.md @@ -43,8 +43,8 @@ the Pod: The output looks like this: - NAME READY STATUS RESTARTS AGE - test-projected-volume 1/1 Running 0 14s + NAME READY STATUS RESTARTS AGE + test-projected-volume 1/1 Running 0 14s 1. In another terminal, get a shell to the running Container: diff --git a/docs/tasks/configure-pod-container/configure-service-account.md b/docs/tasks/configure-pod-container/configure-service-account.md index 51c1460540..0d76e8fa11 100644 --- a/docs/tasks/configure-pod-container/configure-service-account.md +++ b/docs/tasks/configure-pod-container/configure-service-account.md @@ -11,10 +11,11 @@ A service account provides an identity for processes that run in a Pod. *This is a user introduction to Service Accounts. See also the [Cluster Admin Guide to Service Accounts](/docs/admin/service-accounts-admin).* -*Note: This document describes how service accounts behave in a cluster set up +**Note:** This document describes how service accounts behave in a cluster set up as recommended by the Kubernetes project. Your cluster administrator may have customized the behavior in your cluster, in which case this documentation may -not apply.* +not apply. +{: .note} When you (a human) access the cluster (e.g. using `kubectl`), you are authenticated by the apiserver as a particular User Account (currently this is @@ -159,7 +160,8 @@ token: ... namespace: 7 bytes ``` -> Note that the content of `token` is elided here. +**Note:** The content of `token` is elided here. +{: .note} ## Add ImagePullSecrets to a service account @@ -180,6 +182,7 @@ kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "myregis ``` Interactive version requiring manual edit: + ```shell $ kubectl get serviceaccounts default -o yaml > ./sa.yaml $ cat sa.yaml diff --git a/docs/tasks/configure-pod-container/quality-service-pod.md b/docs/tasks/configure-pod-container/quality-service-pod.md index 685d528ff7..e549effb67 100644 --- a/docs/tasks/configure-pod-container/quality-service-pod.md +++ b/docs/tasks/configure-pod-container/quality-service-pod.md @@ -81,10 +81,11 @@ spec: qosClass: Guaranteed ``` -**Note**: If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes +**Note:** If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own cpu limit, but does not specify a cpu request, Kubernetes automatically assigns a cpu request that matches the limit. +{: .note} Delete your Pod: diff --git a/docs/tasks/configure-pod-container/security-context.md b/docs/tasks/configure-pod-container/security-context.md index 51cd879c58..586a570595 100644 --- a/docs/tasks/configure-pod-container/security-context.md +++ b/docs/tasks/configure-pod-container/security-context.md @@ -294,9 +294,8 @@ bits 12 and 25 are set. Bit 12 is `CAP_NET_ADMIN`, and bit 25 is `CAP_SYS_TIME`. See [capability.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/capability.h) for definitions of the capability constants. -**Note**: Linux capability constants have the form `CAP_XXX`. But when you list capabilities -in your Container manifest, you must omit the `CAP_` portion of the constant. For example, -to add `CAP_SYS_TIME`, include `SYS_TIME` in your list of capabilities. +**Note:** Linux capability constants have the form `CAP_XXX`. But when you list capabilities in your Container manifest, you must omit the `CAP_` portion of the constant. For example, to add `CAP_SYS_TIME`, include `SYS_TIME` in your list of capabilities. +{: .note} ## Assign SELinux labels to a Container @@ -313,8 +312,8 @@ securityContext: level: "s0:c123,c456" ``` -**Note**: To assign SELinux labels, the SELinux security module must be loaded -on the host operating system. +**Note:** To assign SELinux labels, the SELinux security module must be loaded on the host operating system. +{: .note} ## Discussion @@ -333,9 +332,8 @@ need to set the `level` section. This sets the [Multi-Category Security (MCS)](https://selinuxproject.org/page/NB_MLS) label given to all Containers in the Pod as well as the Volumes. -**Warning**: After you specify an MCS label for a Pod, all Pods with the same -label will able to access the Volume. So if you need inter-Pod -protection, you must ensure each Pod is assigned a unique MCS label. +**Warning:** After you specify an MCS label for a Pod, all Pods with the same label will able to access the Volume. So if you need inter-Pod protection, you must ensure each Pod is assigned a unique MCS label. +{: .warning} {% endcapture %}