Skip to content

Commit d634fb7

Browse files
aburdenthehandk8s-ci-robot
authored andcommitted
Flag names changed (s/admission-control/enable-admission-plugins); disable-admissions-plugin entry added; removed reference to admission controller/plugins requiring set order (for v1.10), redundant example enabling specific plugin, and redundant version-specific info (#7449)
1 parent 44b51d6 commit d634fb7

File tree

14 files changed

+35
-36
lines changed

14 files changed

+35
-36
lines changed

docs/admin/admission-controllers.md

+17-18
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ controllers may modify the objects they admit; validating controllers may not.
3131
The admission control process proceeds in two phases. In the first phase,
3232
mutating admission controllers are run. In the second phase, validating
3333
admission controllers are run. Note again that some of the controllers are
34-
both. In both phases, the controllers are run in the order specified by the
35-
`--admission-control` flag of `kube-apiserver`.
34+
both.
3635

3736
If any of the controllers in either phase reject the request, the entire
3837
request is rejected immediately and an error is returned to the end-user.
@@ -54,13 +53,12 @@ support all the features you expect.
5453

5554
## How do I turn on an admission controller?
5655

57-
The Kubernetes API server supports a flag, `admission-control` that takes a comma-delimited,
58-
ordered list of admission control choices to invoke prior to modifying objects in the cluster.
59-
For example, the following command line turns on the `NamespaceLifecycle` and the `LimitRanger`
60-
admission controller:
56+
The Kubernetes API server flag `enable-admission-plugins` takes a comma-delimited list of admission control plugins to invoke prior to modifying objects in the cluster.
57+
For example, the following command line enables the `NamespaceLifecycle` and the `LimitRanger`
58+
admission control plugins:
6159

6260
```shell
63-
kube-apiserver --admission-control=NamespaceLifecyle,LimitRanger ...
61+
kube-apiserver --enable-admission-plugins=NamespaceLifecyle,LimitRanger ...
6462
```
6563

6664
**Note**: Depending on the way your Kubernetes cluster is deployed and how the
@@ -70,6 +68,14 @@ deployed as a systemd service, you may modify the manifest file for the API
7068
server if Kubernetes is deployed in a self-hosted way.
7169
{: .note}
7270

71+
## How do I turn off an admission controller?
72+
73+
The Kubernetes API server flag `disable-admission-plugins` takes a comma-delimited list of admission control plugins to be disabled, even if they are in the list of plugins enabled by default.
74+
75+
```shell
76+
kube-apiserver --disable-admission-plugins=PodNodeSelector,AlwaysDeny ...
77+
```
78+
7379
## What does each admission controller do?
7480

7581
### AlwaysAdmit (DEPRECATED)
@@ -134,7 +140,7 @@ enabling this admission controller.
134140

135141
### EventRateLimit (alpha)
136142

137-
This admission controller is introduced in v1.9 to mitigate the problem where the API server gets flooded by
143+
This admission controller mitigates the problem where the API server gets flooded by
138144
event requests. The cluster admin can specify event rate limits by:
139145

140146
* Ensuring that `eventratelimit.admission.k8s.io/v1alpha1=true` is included in the
@@ -180,19 +186,15 @@ for more details.
180186
181187
### ExtendedResourceToleration
182188
183-
This plug-in is introduced in v1.9 to facilitate creation of dedicated nodes with extended resources.
189+
This plug-in facilitates creation of dedicated nodes with extended resources.
184190
If operators want to create dedicated nodes with extended resources (like GPUs, FPGAs etc.), they are expected to
185191
taint the node with the extended resource name as the key. This admission controller, if enabled, automatically
186192
adds tolerations for such taints to pods requesting extended resources, so users don't have to manually
187193
add these tolerations.
188194
189195
### ImagePolicyWebhook
190196
191-
The ImagePolicyWebhook admission controller allows a backend webhook to make admission decisions. You enable this admission controller by setting the admission-control option as follows:
192-
193-
```shell
194-
--admission-control=ImagePolicyWebhook
195-
```
197+
The ImagePolicyWebhook admission controller allows a backend webhook to make admission decisions.
196198
197199
#### Configuration File Format
198200
@@ -314,7 +316,6 @@ In any case, the annotations are provided by the user and are not validated by K
314316

315317
### Initializers (alpha)
316318

317-
This admission controller is introduced in v1.7.
318319
The admission controller determines the initializers of a resource based on the existing
319320
`InitializerConfiguration`s. It sets the pending initializers by modifying the
320321
metadata of the resource to be created.
@@ -554,8 +555,6 @@ objects in your Kubernetes deployment, you MUST use this admission controller to
554555

555556
See the [resourceQuota design doc](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_resource_quota.md) and the [example of Resource Quota](/docs/concepts/policy/resource-quotas/) for more details.
556557

557-
It is strongly encouraged that this admission controller is configured last in the sequence of admission controllers. This is
558-
so that quota is not prematurely incremented only for the request to be rejected later in admission control.
559558

560559
### SecurityContextDeny
561560

@@ -590,7 +589,7 @@ versions >= 1.9).
590589
## Is there a recommended set of admission controllers to use?
591590

592591
Yes.
593-
For Kubernetes >= 1.9.0, we strongly recommend running the following set of admission controllers (order matters):
592+
For Kubernetes >= 1.9.0, we strongly recommend running the following set of admission controllers (order matters for 1.9 but not >1.10):
594593

595594
```shell
596595
--admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota

docs/admin/authorization/node.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This group and user name format match the identity created for each kubelet as p
4545

4646
To enable the Node authorizer, start the apiserver with `--authorization-mode=Node`.
4747

48-
To limit the API objects kubelets are able to write, enable the [NodeRestriction](/docs/admin/admission-controllers#NodeRestriction) admission plugin by starting the apiserver with `--admission-control=...,NodeRestriction,...`
48+
To limit the API objects kubelets are able to write, enable the [NodeRestriction](/docs/admin/admission-controllers#NodeRestriction) admission plugin by starting the apiserver with `--enable-admission-plugins=...,NodeRestriction,...`
4949

5050
## Migration considerations
5151

docs/admin/extensible-admission-controllers.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ the following:
2020
* They need to be compiled into kube-apiserver.
2121
* They are only configurable when the apiserver starts up.
2222

23-
1.7 introduces two alpha features, *Initializers* and *External Admission
23+
1.7 introduced two alpha features, *Initializers* and *External Admission
2424
Webhooks*, that address these limitations. These features allow admission
2525
controllers to be developed out-of-tree and configured at runtime.
2626

@@ -81,7 +81,7 @@ perform its assigned task and remove its name from the list.
8181
*Initializers* is an alpha feature, so it is disabled by default. To turn it on,
8282
you need to:
8383

84-
* Include "Initializers" in the `--admission-control` flag when starting
84+
* Include "Initializers" in the `--enable-admission-plugins` flag when starting
8585
`kube-apiserver`. If you have multiple `kube-apiserver` replicas, all should
8686
have the same flag setting.
8787

@@ -184,7 +184,7 @@ admission request.
184184
*External Admission Webhooks* is an alpha feature, so it is disabled by default.
185185
To turn it on, you need to
186186

187-
* Include "GenericAdmissionWebhook" in the `--admission-control` flag when
187+
* Include "GenericAdmissionWebhook" in the `--enable-admission-plugins` flag when
188188
starting the apiserver. If you have multiple `kube-apiserver` replicas, all
189189
should have the same flag setting.
190190

@@ -278,7 +278,7 @@ differences:
278278
Make sure that all expansions of the `<apiGroup, apiVersions,resources>` tuple
279279
in a `rule` are valid. If they are not, separate them to different `rules`.
280280

281-
You can also specify the `failurePolicy`. In 1.7, the system supports `Ignore`
281+
You can also specify the `failurePolicy`. As of 1.7, the system supports `Ignore`
282282
and `Fail` policies, meaning that upon a communication error with the webhook
283283
admission controller, the `GenericAdmissionWebhook` can admit or reject the
284284
operation based on the configured policy.

docs/admin/high-availability/kube-apiserver.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
- /bin/sh
1212
- -c
1313
- /usr/local/bin/kube-apiserver --address=127.0.0.1 --etcd-servers=http://127.0.0.1:4001
14-
--cloud-provider=gce --admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota
14+
--cloud-provider=gce --enable-admission-plugins=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota
1515
--service-cluster-ip-range=10.0.0.0/16 --client-ca-file=/srv/kubernetes/ca.crt
1616
--basic-auth-file=/srv/kubernetes/basic_auth.csv --cluster-name=e2e-test-bburns
1717
--tls-cert-file=/srv/kubernetes/server.cert --tls-private-key-file=/srv/kubernetes/server.key

docs/concepts/configuration/pod-priority-preemption.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Also enable scheduling.k8s.io/v1alpha1 API and Priority [admission controller](/
4545

4646

4747
```
48-
--runtime-config=scheduling.k8s.io/v1alpha1=true --admission-control=Controller-Foo,Controller-Bar,...,Priority
48+
--runtime-config=scheduling.k8s.io/v1alpha1=true --enable-admission-plugins=Controller-Foo,Controller-Bar,...,Priority
4949
```
5050

5151
After the feature is enabled, you can create [PriorityClasses](#priorityclass)

docs/concepts/policy/resource-quotas.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Neither contention nor changes to quota will affect already created resources.
4242

4343
## Enabling Resource Quota
4444

45-
Resource quota support is enabled by default for many Kubernetes distributions. It is
46-
enabled when the apiserver `--admission-control=` flag has `ResourceQuota` as
45+
Resource Quota support is enabled by default for many Kubernetes distributions. It is
46+
enabled when the apiserver `--enable-admission-plugins=` flag has `ResourceQuota` as
4747
one of its arguments.
4848

4949
A resource quota is enforced in a particular namespace when there is a

docs/concepts/storage/persistent-volumes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dynamic provisioning for themselves.
5454
To enable dynamic storage provisioning based on storage class, the cluster administrator
5555
needs to enable the `DefaultStorageClass` [admission controller](/docs/admin/admission-controllers/#defaultstorageclass)
5656
on the API server. This can be done, for example, by ensuring that `DefaultStorageClass` is
57-
among the comma-delimited, ordered list of values for the `--admission-control` flag of
57+
among the comma-delimited, ordered list of values for the `--enable-admission-plugins` flag of
5858
the API server component. For more information on API server command line flags,
5959
please check [kube-apiserver](/docs/admin/kube-apiserver/) documentation.
6060

docs/concepts/workloads/pods/podpreset.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ In order to use Pod Presets in your cluster you must ensure the following:
6868
example, this can be done by including `settings.k8s.io/v1alpha1=true` in
6969
the `--runtime-config` option for the API server.
7070
1. You have enabled the admission controller `PodPreset`. One way to doing this
71-
is to include `PodPreset` in the `--admission-control` option value specified
71+
is to include `PodPreset` in the `--enable-admission-plugins` option value specified
7272
for the API server.
7373
1. You have defined your Pod Presets by creating `PodPreset` objects in the
7474
namespace you will use.

docs/getting-started-guides/coreos/cloud-configs/master.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ coreos:
9191
ExecStart=/opt/bin/kube-apiserver \
9292
--service-account-key-file=/opt/bin/kube-serviceaccount.key \
9393
--service-account-lookup=false \
94-
--admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota \
94+
--enable-admission-plugins=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota \
9595
--runtime-config=api/v1 \
9696
--allow-privileged=true \
9797
--insecure-bind-address=0.0.0.0 \

docs/getting-started-guides/scratch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ Here are some apiserver flags you may need to set:
607607
- `--etcd-servers=http://127.0.0.1:4001`
608608
- `--tls-cert-file=/srv/kubernetes/server.cert`
609609
- `--tls-private-key-file=/srv/kubernetes/server.key`
610-
- `--admission-control=$RECOMMENDED_LIST`
610+
- `--enable-admission-plugins=$RECOMMENDED_LIST`
611611
- See [admission controllers](/docs/admin/admission-controllers/) for recommended arguments.
612612
- `--allow-privileged=true`, only if you trust your cluster user to run pods as root.
613613

docs/reference/setup-tools/kubeadm/implementation-details.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Other API server flags that are set unconditionally are:
233233
- `--enable-bootstrap-token-auth=true` to enable the `BootstrapTokenAuthenticator` authentication module. see [TLS Bootstrapping](/docs/admin/kubelet-tls-bootstrapping.md) for more details
234234
- `--allow-privileged` to `true` (required e.g. by kube proxy)
235235
- `--requestheader-client-ca-file` to `front-proxy-ca.crt`
236-
- `--admission-control` to:
236+
- `--enable-admission-plugins` to:
237237
- [`Initializers`](/docs/admin/admission-controllers/#initializers-alpha) to enable [Dynamic Admission Control](/docs/admin/extensible-admission-controllers/).
238238
- [`NamespaceLifecycle`](/docs/admin/admission-controllers/#namespacelifecycle) e.g. to avoid deletion of
239239
system reserved namespaces

docs/tasks/administer-cluster/running-cloud-controller.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Successfully running cloud-controller-manager requires some changes to your clus
3333

3434
* `kube-apiserver` and `kube-controller-manager` MUST NOT specify the `--cloud-provider` flag. This ensures that it does not run any cloud specific loops that would be run by cloud controller manager. In the future, this flag will be deprecated and removed.
3535
* `kubelet` must run with `--cloud-provider=external`. This is to ensure that the kubelet is aware that it must be initialized by the cloud controller manager before it is scheduled any work.
36-
* `kube-apiserver` SHOULD NOT run the `PersistentVolumeLabel` admission controller since the cloud controller manager takes over labeling persistent volumes. To prevent the PersistentVolumeLabel admission plugin from running, make sure the `kube-apiserver` has a `--admission-control` flag with a value that does not include `PersistentVolumeLabel`.
36+
* `kube-apiserver` SHOULD NOT run the `PersistentVolumeLabel` admission controller since the cloud controller manager takes over labeling persistent volumes. To prevent the PersistentVolumeLabel admission plugin from running in `kube-apiserver`, include the `PersistentVolumeLabel` as a listed value in the `--disable-admission-plugins` flag.
3737
* For the `cloud-controller-manager` to label persistent volumes, initializers will need to be enabled and an InitializerConifguration needs to be added to the system. Follow [these instructions](/docs/admin/extensible-admission-controllers.md#enable-initializers-alpha-feature) to enable initializers. Use the following YAML to create the InitializerConfiguration:
3838

3939
{% include code.html language="yaml" file="persistent-volume-label-initializer-config.yaml" ghlink="/docs/tasks/administer-cluster/persistent-volume-label-initializer-config.yaml" %}

docs/tasks/federation/set-up-placement-policies-federation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Admission Controller.
5151

5252
Update the Federation API server command line arguments to enable the Admission
5353
Controller and mount the ConfigMap into the container. If there's an existing
54-
`--admission-control` flag, append `,SchedulingPolicy` instead of adding
54+
`--enable-admission-plugins` flag, append `,SchedulingPolicy` instead of adding
5555
another line.
5656

57-
--admission-control=SchedulingPolicy
57+
--enable-admission-plugins=SchedulingPolicy
5858
--admission-control-config-file=/etc/kubernetes/admission/config.yml
5959

6060
Add the following volume to the Federation API server pod:

docs/tutorials/clusters/apparmor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ If the PodSecurityPolicy extension is enabled, cluster-wide AppArmor restriction
320320
enable the PodSecurityPolicy, the following flag must be set on the `apiserver`:
321321

322322
```
323-
--admission-control=PodSecurityPolicy[,others...]
323+
--enable-admission-plugins=PodSecurityPolicy[,others...]
324324
```
325325

326326
The AppArmor options can be specified as annotations on the PodSecurityPolicy:

0 commit comments

Comments
 (0)