Skip to content

Commit c4ea942

Browse files
author
zacharysarah
committed
Merge branch 'master' into release-1.9
2 parents 989acbf + 0e628e7 commit c4ea942

File tree

13 files changed

+273
-122
lines changed

13 files changed

+273
-122
lines changed

_data/glossary/node.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: node
22
name: Node
3-
full-link: /docs/concepts/architecture/node
3+
full-link: /docs/concepts/architecture/nodes/
44
aka:
55
- Minion
66
related:

_data/glossary/replica-set.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
id: replica-set
2+
name: ReplicaSet
3+
full-link: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
4+
related:
5+
- replication-controller
6+
tags:
7+
- core-object
8+
- architecture
9+
short-description: >
10+
ReplicaSet is the next-generation Replication Controller.
11+
long-description: >
12+
ReplicaSet, like ReplicationController, ensures that a specified number of pods replicas are running at one time.
13+
ReplicaSet supports the new set-based selector requirements as described in the labels user guide, whereas a Replication Controller only supports equality-based selector requirements.

_data/glossary/volume.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: volume
22
name: Volume
3-
full-link: kubernetes.io/docs/concepts/storage/volumes/
3+
full-link: /docs/concepts/storage/volumes/
44
related:
55
- pod
66
- container

_data/tools.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toc:
66
- title: Native Tools
77
section:
88
- title: Kubectl
9-
path: /docs/user-guide/kubectl/
9+
path: /docs/reference/kubectl/overview/
1010
- title: Kubeadm
1111
path: /docs/getting-started-guides/kubeadm
1212
- title: Kubefed

_redirects

+6-4
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@
140140
/docs/contribute/style-guide/ /docs/home/contribute/style-guide/ 301
141141

142142
/docs/contribute/write-new-topic/ /docs/home/contribute/write-new-topic/ 301
143-
/docs/deprecate/ /ddocs/reference/deprecation-policy/ 301
144-
/docs/deprecated/ /ddocs/reference/deprecation-policy/ 301
143+
/docs/deprecate/ /docs/reference/deprecation-policy/ 301
144+
/docs/deprecated/ /docs/reference/deprecation-policy/ 301
145145
/docs/deprecation-policy/ /docs/reference/deprecation-policy/ 301
146146

147147
/docs/federation/api-reference/ /docs/reference/federation/v1/operations/ 301
@@ -167,6 +167,7 @@
167167
/docs/getting-started-guides/juju/ /docs/getting-started-guides/ubuntu/installation/ 301
168168
/docs/getting-started-guides/kargo/ /docs/getting-started-guides/kubespray/ 301
169169
/docs/getting-started-guides/kubeadm/ /docs/setup/independent/create-cluster-kubeadm/ 301
170+
/docs/getting-started-guides/kubectl/ /docs/reference/kubectl/overview/ 301
170171
/docs/getting-started-guides/logging/ /docs/concepts/cluster-administration/logging/ 301
171172
/docs/getting-started-guides/logging-elasticsearch/ /docs/tasks/debug-application-cluster/logging-elasticsearch-kibana/ 301
172173
/docs/getting-started-guides/meanstack/ https://medium.com/google-cloud/running-a-mean-stack-on-google-cloud-platform-with-kubernetes-149ca81c2b5d/ 301
@@ -235,6 +236,7 @@
235236
/docs/tasks/configure-pod-container/downward-api-volume-expose-pod-information/ /docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/ 301
236237
/docs/tasks/configure-pod-container/environment-variable-expose-pod-information/ /docs/tasks/inject-data-application/environment-variable-expose-pod-information/ 301
237238
/docs/tasks/configure-pod-container/limit-range/ /docs/tasks/administer-cluster/cpu-memory-limit/ 301
239+
/docs/tasks/configure-pod-container/opaque-integer-resource/ /docs/concepts/configuration/manage-compute-resources-container/#opaque-integer-resources-alpha-feature 301
238240
/docs/tasks/configure-pod-container/projected-volume/ /docs/tasks/configure-pod-container/configure-projected-volume-storage/ 301
239241
/docs/tasks/configure-pod-container/romana-network-policy/ /docs/tasks/administer-cluster/romana-network-policy/ 301
240242
/docs/tasks/configure-pod-container/weave-network-policy/ /docs/tasks/administer-cluster/weave-network-policy/ 301
@@ -343,7 +345,7 @@
343345
/docs/user-guide/kubectl-conventions/ /docs/reference/kubectl/conventions/
344346
/docs/user-guide/kubectl-cheatsheet/ /docs/reference/kubectl/cheatsheet/
345347
/docs/user-guide/kubectl/1_5/* https://v1-5.docs.kubernetes.io/docs/user-guide/kubectl/v1.5/ 301
346-
/docs/user-guide/kubectl/kubectl_*/ /docs/user-guide/kubectl/v1.7/#:splat 301
348+
/docs/user-guide/kubectl/kubectl_*/ /docs/reference/generated/kubectl/kubectl-commands#:splat 301
347349
/docs/user-guide/kubectl/v1.5/node_modules/* https://v1-5.docs.kubernetes.io/docs/user-guide/kubectl/v1.5/ 301
348350
/docs/user-guide/kubectl/v1.6/node_modules/* https://v1-6.docs.kubernetes.io/docs/user-guide/kubectl/v1.6/ 301
349351
/docs/user-guide/labels/ /docs/concepts/overview/working-with-objects/labels/ 301
@@ -422,7 +424,7 @@
422424
/v1.1/docs/admin/networking.html /docs/concepts/cluster-administration/networking/ 301
423425
/v1.1/docs/getting-started-guides/ /docs/tutorials/kubernetes-basics/ 301
424426

425-
https://kubernetes-io-v1-7.netlify.com/* https://v1-7.docs.kubernetes.io/"splat 301
427+
https://kubernetes-io-v1-7.netlify.com/* https://v1-7.docs.kubernetes.io/:splat 301
426428

427429
/docs/admin/cloud-controller-manager/ /docs/reference/generated/cloud-controller-manager/ 301
428430
/docs/admin/kube-apiserver/ /docs/reference/generated/kube-apiserver/ 301

docs/admin/authentication.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ For an identity provider to work with Kubernetes it must:
317317
3. Have a CA signed certificate (even if the CA is not a commercial CA or is self signed)
318318

319319
A note about requirement #3 above, requiring a CA signed certificate. If you deploy your own identity provider (as opposed to one of the cloud providers like Google or Microsoft) you MUST have your identity provider's web server certificate signed by a certificate with the `CA` flag set to `TRUE`, even if it is self signed. This is due to GoLang's TLS client implementation being very strict to the standards around certificate validation. If you don't have a CA handy, you can use [this script](https://github.com/coreos/dex/blob/1ee5920c54f5926d6468d2607c728b71cfe98092/examples/k8s/gencert.sh) from the CoreOS team to create a simple CA and a signed certificate and key pair.
320-
Or you can use [this similar script](https://raw.githubusercontent.com/TremoloSecurity/openunison-qs-kubernetes/master/makecerts.sh) that generates SHA256 certs with a longer life and larger key size.
320+
Or you can use [this similar script](https://raw.githubusercontent.com/TremoloSecurity/openunison-qs-kubernetes/master/src/main/bash/makessl.sh) that generates SHA256 certs with a longer life and larger key size.
321321

322322
Setup instructions for specific systems:
323323

docs/concepts/cluster-administration/device-plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ to advertise 2 `vendor-domain/foo`.
4848
Then, developers can request devices in a
4949
[Container](/docs/api-reference/{{page.version}}/#container-v1-core)
5050
specification by using the same process that is used for
51-
[opaque integer resources](/docs/tasks/configure-pod-container/opaque-integer-resource/).
51+
[opaque integer resources](/docs/concepts/configuration/manage-compute-resources-container/#opaque-integer-resources-alpha-feature).
5252
In version 1.8, extended resources are supported only as integer resources and must have
5353
`limit` equal to `request` in the Container specification.
5454

docs/concepts/configuration/assign-pod-node.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Highly Available database statefulset has one master and three replicas, one may
316316
|:--------------------:|:-------------------:|:------------------:|:------------------:|
317317
| *DB-MASTER* | *DB-REPLICA-1* | *DB-REPLICA-2* | *DB-REPLICA-3* |
318318
319-
[Here](https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/#tolerating-node-failure) is an example of zookeper statefulset configured with anti-affinity for high availability.
319+
[Here](https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/#tolerating-node-failure) is an example of Zookeeper statefulset configured with anti-affinity for high availability.
320320
321321
For more information on inter-pod affinity/anti-affinity, see the design doc
322322
[here](https://git.k8s.io/community/contributors/design-proposals/scheduling/podaffinity.md).

docs/concepts/overview/extending.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ This diagram shows the extension points in a Kubernetes system.
9494

9595
<!-- image source diagrams: https://docs.google.com/drawings/d/1k2YdJgNTtNfW7_A8moIIkij-DmVgEhNrn3y2OODwqQQ/view -->
9696

97-
1. Users often interact with the Kubernetes API using `kubectl`. [Kubectl plugins](docs/tasks/extend-kubectl/kubectl-plugins) extend the kubectl binary. They only affect the individual user's local environment, and so cannot enforce site-wide policies.
98-
2. The apiserver handles all requests. Several types of extension points in the apiserver allow authenticating requests, or blocking them based on their content, editing content, and handling deletion. These are described in the [API Access Extensions](docs/concepts/overview/extending#api-access-extensions) section.
99-
3. The apiserver serves various kinds of *resources*. *Built-in resource kinds*, like `pods`, are defined by the Kubernetes project and can't be changed. You can also add resources that you define, or that other projects have defined, called *Custom Resources*, as explained in the [Custom Resources](docs/concepts/overview/extending#custom-resources) section. Custom Resources are often used with API Access Extensions.
100-
4. The Kubernetes scheduler decides which nodes to place pods on. There are several ways to extend scheduling. These are described in the [Scheduler Extensions](docs/concepts/overview/extending#shceduler-extensions) section.
97+
1. Users often interact with the Kubernetes API using `kubectl`. [Kubectl plugins](/docs/tasks/extend-kubectl/kubectl-plugins/) extend the kubectl binary. They only affect the individual user's local environment, and so cannot enforce site-wide policies.
98+
2. The apiserver handles all requests. Several types of extension points in the apiserver allow authenticating requests, or blocking them based on their content, editing content, and handling deletion. These are described in the [API Access Extensions](/docs/concepts/overview/extending#api-access-extensions) section.
99+
3. The apiserver serves various kinds of *resources*. *Built-in resource kinds*, like `pods`, are defined by the Kubernetes project and can't be changed. You can also add resources that you define, or that other projects have defined, called *Custom Resources*, as explained in the [Custom Resources](/docs/concepts/overview/extending#custom-resources) section. Custom Resources are often used with API Access Extensions.
100+
4. The Kubernetes scheduler decides which nodes to place pods on. There are several ways to extend scheduling. These are described in the [Scheduler Extensions](/docs/concepts/overview/extending#scheduler-extensions) section.
101101
5. Much of the behavior of Kubernetes is implemented by programs called Controllers which are clients of the API-Server. Controllers are often used in conjunction with Custom Resources.
102-
6. The kubelet runs on servers, and helps pods appear like virtual servers with their own IPs on the cluster network. [Network Plugins](docs/concepts/overview/extending#network-plugins) allow for different implementations of pod networking.
103-
7. The kubelet also mounts and unmounts volumes for containers. New types of storage can be supported via [Storage Plugins](docs/concepts/overview/extending#storage-plugins).
102+
6. The kubelet runs on servers, and helps pods appear like virtual servers with their own IPs on the cluster network. [Network Plugins](/docs/concepts/overview/extending#network-plugins) allow for different implementations of pod networking.
103+
7. The kubelet also mounts and unmounts volumes for containers. New types of storage can be supported via [Storage Plugins](/docs/concepts/overview/extending#storage-plugins).
104104

105105
If you are unsure where to start, this flowchart can help. Note that some solutions may involve several types of extensions.
106106

@@ -116,7 +116,7 @@ Consider adding a Custom Resource to Kubernetes if you want to define new contro
116116

117117
Do not use a Custom Resource as data storage for application, user, or monitoring data.
118118

119-
For more about Custom Resources, see the [Custom Resources concept guide](/docs/concepts/api-extension/custom-resources.md).
119+
For more about Custom Resources, see the [Custom Resources concept guide](/docs/concepts/api-extension/custom-resources/).
120120

121121

122122
### Combining New APIs with Automation
@@ -200,11 +200,11 @@ the nodes chosen for a pod.
200200
{% capture whatsnext %}
201201

202202
* Learn more about [Custom Resources](/docs/concepts/api-extension/custom-resources/)
203-
* Learn about [Dynamic admission control](/docs/admin/extensible-admission-controller)
203+
* Learn about [Dynamic admission control](/docs/admin/extensible-admission-controllers/)
204204
* Learn more about Infrastructure extensions
205-
* [Network Plugins](/docs/concepts/cluster-administration/network-plugin)
206-
* [Device Plugins](/docs/concepts/cluster-administration/device-plugins.md)
207-
* Learn about [kubectl plugins](/docs/tasks/extend-kubectl/kubectl-plugin)
205+
* [Network Plugins](/docs/concepts/cluster-administration/network-plugins/)
206+
* [Device Plugins](/docs/concepts/cluster-administration/device-plugins/)
207+
* Learn about [kubectl plugins](/docs/tasks/extend-kubectl/kubectl-plugins/)
208208
* See examples of Automation
209209
* [List of Operators](https://github.com/coreos/awesome-kubernetes-extensions)
210210

docs/concepts/policy/pod-security-policy.md

+80-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,86 @@ make sure `volumes` contains the `flexVolume` volume type, no flex volume driver
171171
otherwise. For example:
172172

173173
```yaml
174-
apiVersion: extensions/v1beta1
175-
kind: PodSecurityPolicy
174+
# Authorize all service accounts in a namespace:
175+
- kind: Group
176+
apiGroup: rbac.authorization.k8s.io
177+
name: system:serviceaccounts
178+
# Or equivalently, all authenticated users in a namespace:
179+
- kind: Group
180+
apiGroup: rbac.authorization.k8s.io
181+
name: system:authenticated
182+
```
183+
184+
For more examples of RBAC bindings, see [Role Binding
185+
Examples](/docs/admin/authorization/rbac/#role-binding-examples). For a complete
186+
example of authorizing a PodSecurityPolicy, see
187+
[below](#example).
188+
189+
190+
### Troubleshooting
191+
192+
- The [Controller Manager](/docs/admin/kube-controller-manager/) must be run
193+
against [the secured API port](/docs/admin/accessing-the-api/), and must not
194+
have superuser permissions. Otherwise requests would bypass authentication and
195+
authorization modules, all PodSecurityPolicy objects would be allowed, and users
196+
would be able to create privileged containers. For more details on configuring
197+
Controller Manager authorization, see [Controller
198+
Roles](/docs/admin/authorization/rbac/#controller-roles).
199+
200+
## Policy Order
201+
202+
In addition to restricting pod creation and update, pod security policies can
203+
also be used to provide default values for many of the fields that it
204+
controls. When multiple policies are available, the pod security policy
205+
controller selects policies in the following order:
206+
207+
1. If any policies successfully validate the pod without altering it, they are
208+
used.
209+
2. Otherwise, the first valid policy in alphabetical order is used.
210+
211+
## Example
212+
213+
_This example assumes you have a running cluster with the PodSecurityPolicy
214+
admission controller enabled and you have cluster admin privileges._
215+
216+
### Set up
217+
218+
Set up a namespace and a service account to act as for this example. We'll use
219+
this service account to mock a non-admin user.
220+
221+
```shell
222+
$ kubectl create namespace psp-example
223+
$ kubectl create serviceaccount -n psp-example fake-user
224+
$ kubectl create rolebinding -n psp-example fake-editor --clusterrole=edit --serviceaccount=psp-example:fake-user
225+
```
226+
227+
To make it clear which user we're acting as and save some typing, create 2
228+
aliases:
229+
230+
```shell
231+
$ alias kubectl-admin='kubectl -n psp-example'
232+
$ alias kubectl-user='kubectl --as=system:serviceaccount:psp-example:fake-user -n psp-example'
233+
```
234+
235+
### Create a policy and a pod
236+
237+
Define the example PodSecurityPolicy object in a file. This is a policy that
238+
simply prevents the creation of privileged pods.
239+
240+
{% include code.html language="yaml" file="example-psp.yaml" ghlink="/docs/concepts/policy/example-psp.yaml" %}
241+
242+
And create it with kubectl:
243+
244+
```shell
245+
$ kubectl-admin create -f example-psp.yaml
246+
```
247+
248+
Now, as the unprivileged user, try to create a simple pod:
249+
250+
```shell
251+
$ kubectl-user create -f- <<EOF
252+
apiVersion: v1
253+
kind: Pod
176254
metadata:
177255
name: allow-flex-volumes
178256
spec:

docs/tasks/administer-cluster/access-cluster-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $ kubectl config view
3232
```
3333

3434
Many of the [examples](https://github.com/kubernetes/examples/tree/{{page.githubbranch}}/) provide an introduction to using
35-
kubectl. Complete documentation is found in the [kubectl manual](/docs/user-guide/kubectl/index).
35+
kubectl. Complete documentation is found in the [kubectl manual](/docs/reference/kubectl/overview/).
3636

3737
### Directly accessing the REST API
3838

0 commit comments

Comments
 (0)