Skip to content

Commit 1363e5b

Browse files
Merge pull request kubernetes#3048 from kubernetes/release-1.6
Merge Release 1.6 into Master, publishing documentation for 1.6 release
2 parents 30f0d4d + 70d3939 commit 1363e5b

File tree

2,533 files changed

+411852
-98556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,533 files changed

+411852
-98556
lines changed

_data/guides.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ toc:
2424
- docs/user-guide/rolling-updates.md
2525
- docs/user-guide/update-demo/index.md
2626
- docs/user-guide/configmap/index.md
27+
- docs/user-guide/projected-volume/index.md
2728
- docs/user-guide/horizontal-pod-autoscaling/walkthrough.md
2829
- docs/user-guide/config-best-practices.md
2930
- docs/user-guide/working-with-resources.md
@@ -107,6 +108,7 @@ toc:
107108
- docs/getting-started-guides/rackspace.md
108109
- docs/getting-started-guides/kops.md
109110
- docs/getting-started-guides/kargo.md
111+
- docs/getting-started-guides/running-cloud-controller.md
110112
- title: On-Premise VMs
111113
section:
112114
- docs/getting-started-guides/coreos/index.md
@@ -167,6 +169,7 @@ toc:
167169
- docs/admin/upgrade-1-6.md
168170
- docs/admin/kubeadm.md
169171
- docs/admin/addons.md
172+
- docs/admin/node-allocatable.md
170173
- docs/admin/audit.md
171174
- docs/admin/ha-master-gce.md
172175
- docs/admin/namespaces/index.md
@@ -180,6 +183,7 @@ toc:
180183
- docs/admin/sysctls.md
181184
- docs/admin/cluster-components.md
182185
- docs/admin/etcd.md
186+
- docs/admin/etcd_upgrade.md
183187
- docs/admin/multi-cluster.md
184188
- title: Changing Cluster Size
185189
path: https://github.com/kubernetes/kubernetes/wiki/User-FAQ#how-do-i-change-the-size-of-my-cluster/

_data/overrides.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
overrides:
2-
- path: docs/api-reference
3-
- path: docs/user-guide/kubectl
42
- path: docs/admin/federation-apiserver.md
53
- path: docs/admin/federation-controller-manager.md
64
- path: docs/admin/kube-apiserver.md
75
- path: docs/admin/kube-controller-manager.md
86
- path: docs/admin/kube-proxy.md
97
- path: docs/admin/kube-scheduler.md
108
- path: docs/admin/kubelet.md
11-
- changedpath: docs/api-reference/extensions/v1beta1/definitions.html _includes/v1.5/extensions-v1beta1-definitions.html
12-
- changedpath: docs/api-reference/extensions/v1beta1/operations.html _includes/v1.5/extensions-v1beta1-operations.html
13-
- changedpath: docs/api-reference/v1/definitions.html _includes/v1.5/v1-definitions.html
14-
- changedpath: docs/api-reference/v1/operations.html _includes/v1.5/v1-operations.html
159
- copypath: k8s/federation/docs/api-reference/ docs/federation/
1610
- copypath: k8s/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml docs/getting-started-guides/fluentd-gcp.yaml
17-

_data/reference.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,24 @@ abstract: "Design docs, concept definitions, and references for APIs and CLIs."
33
toc:
44
- docs/reference.md
55

6-
- title: "Kubernetes Resource Types (New Docs Style)"
6+
- title: "Kubernetes Resource Types"
77
section:
8+
- title: Version 1.6
9+
path: /docs/resources-reference/v1.6/
810
- title: Version 1.5
911
path: /docs/resources-reference/v1.5/
1012

11-
- title: "Kubernetes API (New Docs Style)"
13+
- title: "Kubernetes API"
1214
section:
15+
- title: Version 1.6
16+
path: /docs/api-reference/v1.6/
1317
- title: Version 1.5
1418
path: /docs/api-reference/v1.5/
1519

16-
- title: "Kubectl Commands (New Docs Style)"
20+
- title: "Kubectl Commands"
1721
section:
22+
- title: Version 1.6
23+
path: /docs/user-guide/kubectl/v1.6/
1824
- title: Version 1.5
1925
path: /docs/user-guide/kubectl/v1.5/
2026

@@ -25,7 +31,11 @@ toc:
2531
section:
2632
- docs/admin/accessing-the-api.md
2733
- docs/admin/authentication.md
28-
- docs/admin/authorization.md
34+
- docs/admin/bootstrap-tokens.md
35+
- title: Authorization Plugins
36+
section:
37+
- docs/admin/authorization/index.md
38+
- docs/admin/authorization/rbac.md
2939
- docs/admin/admission-controllers.md
3040
- docs/admin/service-accounts-admin.md
3141
- docs/api-reference/v1/operations.html
@@ -174,6 +184,7 @@ toc:
174184
- docs/user-guide/petset.md
175185
- docs/user-guide/pods/index.md
176186
- docs/user-guide/pod-security-policy/index.md
187+
- docs/user-guide/pod-preset/index.md
177188
- docs/user-guide/replicasets.md
178189
- docs/user-guide/replication-controller/index.md
179190
- docs/admin/resourcequota/index.md

_data/tasks.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ toc:
5757
section:
5858
- docs/tasks/access-kubernetes-api/http-proxy-access-api.md
5959

60+
- title: Using TLS
61+
section:
62+
- docs/tasks/tls/managing-tls-in-a-cluster.md
63+
6064
- title: Administering a Cluster
6165
section:
6266
- docs/tasks/administer-cluster/overview.md
@@ -65,6 +69,7 @@ toc:
6569
- docs/tasks/administer-cluster/safely-drain-node.md
6670
- docs/tasks/administer-cluster/change-pv-reclaim-policy.md
6771
- docs/tasks/administer-cluster/limit-storage-consumption.md
72+
- docs/tasks/administer-cluster/change-default-storage-class.md
6873
- docs/tasks/administer-cluster/share-configuration.md
6974

7075
- title: Administering Federation
@@ -85,3 +90,7 @@ toc:
8590
- docs/tasks/manage-stateful-set/deleting-a-statefulset.md
8691
- docs/tasks/manage-stateful-set/debugging-a-statefulset.md
8792
- docs/tasks/manage-stateful-set/delete-pods.md
93+
94+
- title: Managing Cluster Daemons
95+
section:
96+
- docs/tasks/manage-daemon/update-daemon-set.md

docs/admin/accessing-the-api.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ assignees:
33
- bgrant0607
44
- erictune
55
- lavalamp
6-
title: Overview
6+
title: Controlling Accessing to the Kubernetes API
77
---
88

9-
This document describes how access to the Kubernetes API is controlled.
10-
11-
## Overview
12-
139
Users [access the API](/docs/user-guide/accessing-the-cluster) using `kubectl`,
1410
client libraries, or by making REST requests. Both human users and
1511
[Kubernetes service accounts](/docs/user-guide/service-accounts/) can be
@@ -42,7 +38,7 @@ The input to the authentication step is the entire HTTP request, however, it typ
4238
just examines the headers and/or client certificate.
4339

4440
Authentication modules include Client Certificates, Password, and Plain Tokens,
45-
and JWT Tokens (used for service accounts).
41+
Bootstrap Tokens, and JWT Tokens (used for service accounts).
4642

4743
Multiple authentication modules can be specified, in which case each one is tried in sequence,
4844
until one of them succeeds.
@@ -75,7 +71,7 @@ The input to the Authorization step are attributes of the REST request, includin
7571

7672
There are multiple supported Authorization Modules. The cluster creator configures the API
7773
server with which Authorization Modules should be used. When multiple Authorization Modules
78-
are configured, each is checked in sequence, and if any Module authorizes the request,
74+
are configured, each is checked in sequence, and if any Module authorizes the request,
7975
then the request can proceed. If all deny the request, then the request is denied (HTTP status
8076
code 403).
8177

@@ -142,7 +138,7 @@ By default the Kubernetes API server serves HTTP on 2 ports:
142138

143139
2. `Secure Port`:
144140

145-
- use whenever possible
141+
- use whenever possible
146142
- uses TLS. Set cert with `--tls-cert-file` and key with `--tls-private-key-file` flag.
147143
- default is port 6443, change with `--secure-port` flag.
148144
- default IP is first non-localhost network interface, change with `--bind-address` flag.

docs/admin/authentication.md

Lines changed: 90 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,41 @@ header as shown below.
107107
Authorization: Bearer 31ada4fd-adec-460c-809a-9e56ceb75269
108108
```
109109

110+
### Bootstrap Tokens
111+
112+
This feature is currently in **alpha**.
113+
114+
To allow for streamlined bootstrapping for new clusters, Kubernetes includes a
115+
dynamically-managed Bearer token type called a *Bootstrap Token*. These tokens
116+
are stored as Secrets in the `kube-system` namespace, where they can be
117+
dynamically managed and created. Controller Manager contains a TokenCleaner
118+
controller that deletes bootstrap tokens as they expire.
119+
120+
The tokens are of the form `[a-z0-9]{6}.[a-z0-9]{16}`. The first component is a
121+
Token ID and the second component is the Token Secret. You specify the token
122+
in an HTTP header as follows:
123+
124+
```http
125+
Authorization: Bearer 781292.db7bc3a58fc5f07e
126+
```
127+
128+
You must enable the Bootstrap Token Authenticator with the
129+
`--experimental-bootstrap-token-auth` flag on the API Server. You must enable
130+
the TokenCleaner controller via the `--controllers` flag on the Controller
131+
Manager. This is done with something like `--controllers=*,tokencleaner`.
132+
`kubeadm` will do this for you if you are using it to bootstrapping a cluster.
133+
134+
The authenticator authenticates as `system:bootstrap:<Token ID>`. It is
135+
included in the `system:bootstrappers` group. The naming and groups are
136+
intentionally limited to discourage users from using these tokens past
137+
bootstrapping. The user names and group can be used (and are used by `kubeadm`)
138+
to craft the appropriate authorization policies to support bootstrapping a
139+
cluster.
140+
141+
Please see [Bootstrap Tokens](/docs/admin/bootstrap-tokens/) for in depth
142+
documentation on the Bootstrap Token authenticator and controllers along with
143+
how to manage these tokens with `kubeadm`.
144+
110145
### Static Password File
111146

112147
Basic authentication is enabled by passing the `--basic-auth-file=SOMEFILE`
@@ -115,9 +150,10 @@ and the password cannot be changed without restarting API server. Note that basi
115150
authentication is currently supported for convenience while we finish making the
116151
more secure modes described above easier to use.
117152

118-
The basic auth file is a csv file with a minimum of 3 columns: password,
119-
user name, user id, followed by optional group names. Note, if you have more than
120-
one group the column must be double quoted e.g.
153+
The basic auth file is a csv file with a minimum of 3 columns: password, user name, user id.
154+
In Kubernetes version 1.6 and later, you can specify an optional fourth column containing
155+
comma-separated group names. If you have more than one group, you must enclose the fourth
156+
column value in double quotes ("). See the following example:
121157

122158
```conf
123159
password,user,uid,"group1,group2,group3"
@@ -145,7 +181,7 @@ talk to the API server. Accounts may be explicitly associated with pods using th
145181
NOTE: `serviceAccountName` is usually omitted because this is done automatically.
146182

147183
```
148-
apiVersion: extensions/v1beta1
184+
apiVersion: apps/v1beta1
149185
kind: Deployment
150186
metadata:
151187
name: nginx-deployment
@@ -459,11 +495,45 @@ HTTP status codes can be used to supply additional error context.
459495

460496
The API server can be configured to identify users from request header values, such as `X-Remote-User`.
461497
It is designed for use in combination with an authenticating proxy, which sets the request header value.
498+
499+
* `--requestheader-username-headers` Required, case-insensitive. Header names to check, in order, for the user identity. The first header containing a value is used as the username.
500+
* `--requestheader-group-headers` 1.6+. Optional, case-insensitive. "X-Remote-Group" is suggested. Header names to check, in order, for the user's groups. All values in all specified headers are used as group names.
501+
* `--requestheader-extra-headers-prefix` 1.6+. Optional, case-insensitive. "X-Remote-Extra-" is suggested. Header prefixes to look for to determine extra information about the user (typically used by the configured authorization plugin). Any headers beginning with any of the specified prefixes have the prefix removed, the remainder of the header name becomes the extra key, and the header value is the extra value.
502+
503+
For example, with this configuration:
504+
```
505+
--requestheader-username-headers=X-Remote-User
506+
--requestheader-group-headers=X-Remote-Group
507+
--requestheader-extra-headers-prefix=X-Remote-Extra-
508+
```
509+
510+
this request:
511+
```
512+
GET / HTTP/1.1
513+
X-Remote-User: fido
514+
X-Remote-Group: dogs
515+
X-Remote-Group: dachshunds
516+
X-Remote-Extra-Scopes: openid
517+
X-Remote-Extra-Scopes: profile
518+
```
519+
520+
would result in this user info:
521+
```yaml
522+
name: fido
523+
groups:
524+
- dogs
525+
- dachshunds
526+
extra:
527+
scopes:
528+
- openid
529+
- profile
530+
```
531+
532+
462533
In order to prevent header spoofing, the authenticating proxy is required to present a valid client
463534
certificate to the API server for validation against the specified CA before the request headers are
464535
checked.
465536

466-
* `--requestheader-username-headers` Required, case-insensitive. Header names to check, in order, for the user identity. The first header containing a value is used as the identity.
467537
* `--requestheader-client-ca-file` Required. PEM-encoded certificate bundle. A valid client certificate must be presented and validated against the certificate authorities in the specified file before the request headers are checked for user names.
468538
* `--requestheader-allowed-names` Optional. List of common names (cn). If set, a valid client certificate with a Common Name (cn) in the specified list must be presented before the request headers are checked for user names. If empty, any Common Name is allowed.
469539

@@ -493,9 +563,6 @@ changes](https://github.com/kubernetes/kubernetes/pull/25536) for more details.
493563

494564
## Anonymous requests
495565

496-
Anonymous access is enabled by default, and can be disabled by passing `--anonymous-auth=false`
497-
option to the API server during startup.
498-
499566
When enabled, requests that are not rejected by other configured authentication methods are
500567
treated as anonymous requests, and given a username of `system:anonymous` and a group of
501568
`system:unauthenticated`.
@@ -504,8 +571,14 @@ For example, on a server with token authentication configured, and anonymous acc
504571
a request providing an invalid bearer token would receive a `401 Unauthorized` error.
505572
A request providing no bearer token would be treated as an anonymous request.
506573

507-
If you rely on authentication alone to authorize access, either change to use an
508-
authorization mode other than `AlwaysAllow`, or set `--anonymous-auth=false`.
574+
In 1.5.1-1.5.x, anonymous access is disabled by default, and can be enabled by
575+
passing the `--anonymous-auth=false` option to the API server.
576+
577+
In 1.6+, anonymous access is enabled by default if an authorization mode other than `AlwaysAllow`
578+
is used, and can be disabled by passing the `--anonymous-auth=false` option to the API server.
579+
Starting in 1.6, the ABAC and RBAC authorizers require explicit authorization of the
580+
`system:anonymous` user or the `system:unauthenticated` group, so legacy policy rules
581+
that grant access to the `*` user or `*` group do not include anonymous users.
509582

510583
## Plugin Development
511584

@@ -525,7 +598,7 @@ using an existing deployment script or manually through `easyrsa` or `openssl.`
525598
#### Using an Existing Deployment Script
526599

527600
**Using an existing deployment script** is implemented at
528-
`cluster/saltbase/salt/generate-cert/make-ca-cert.sh`.
601+
`cluster/saltbase/salt/generate-cert/make-ca-cert.sh`.
529602

530603
Execute this script with two parameters. The first is the IP address
531604
of API server. The second is a list of subject alternate names in the form `IP:<ip-address> or DNS:<dns-name>`.
@@ -586,3 +659,9 @@ Finally, add the following parameters into API server start parameters:
586659
openssl x509 -noout -text -in ./server.crt
587660

588661
Finally, do not forget to fill out and add the same parameters into the API server start parameters.
662+
663+
#### Certificates API
664+
665+
You can use the `certificates.k8s.io` API to provision
666+
x509 certificates to use for authentication as documented
667+
[here](/docs/tasks/tls/managing-tls-in-a-cluster).

0 commit comments

Comments
 (0)