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
This commit is contained in:
Cody Clark
2017-08-17 16:19:24 -07:00
committed by Steve Perry
parent c5ad73c2d8
commit 7c4e01887b
9 changed files with 28 additions and 19 deletions
@@ -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
@@ -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`.
@@ -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 %}
@@ -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 %}
@@ -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.
@@ -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:
@@ -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
@@ -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:
@@ -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 %}