Skip to content

Commit 6a35986

Browse files
authored
Merge pull request #37734 from sftim/20221105_tweak_admission_controllers_reference
Tweak reference for admission controllers
2 parents 185b882 + f348002 commit 6a35986

File tree

1 file changed

+36
-27
lines changed

1 file changed

+36
-27
lines changed

content/en/docs/reference/access-authn-authz/admission-controllers.md

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ reviewers:
66
- erictune
77
- janetkuo
88
- thockin
9-
title: Using Admission Controllers
9+
title: Admission Controllers Reference
10+
linkTitle: Admission Controllers
1011
content_type: concept
1112
weight: 30
1213
---
@@ -18,9 +19,19 @@ This page provides an overview of Admission Controllers.
1819
<!-- body -->
1920
## What are they?
2021

21-
An admission controller is a piece of code that intercepts requests to the
22+
An _admission controller_ is a piece of code that intercepts requests to the
2223
Kubernetes API server prior to persistence of the object, but after the request
23-
is authenticated and authorized. The controllers consist of the
24+
is authenticated and authorized.
25+
26+
Admission controllers may be _validating_, _mutating_, or both. Mutating
27+
controllers may modify related objects to the requests they admit; validating controllers may not.
28+
29+
Admission controllers limit requests to create, delete, modify objects. Admission
30+
controllers can also block custom verbs, such as a request connect to a Pod via
31+
an API server proxy. Admission controllers do _not_ (and cannot) block requests
32+
to read (**get**, **watch** or **list**) objects.
33+
34+
The admission controllers in Kubernetes {{< skew currentVersion >}} consist of the
2435
[list](#what-does-each-admission-controller-do) below, are compiled into the
2536
`kube-apiserver` binary, and may only be configured by the cluster
2637
administrator. In that list, there are two special controllers:
@@ -29,10 +40,7 @@ mutating and validating (respectively)
2940
[admission control webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks)
3041
which are configured in the API.
3142

32-
Admission controllers may be "validating", "mutating", or both. Mutating
33-
controllers may modify related objects to the requests they admit; validating controllers may not.
34-
35-
Admission controllers limit requests to create, delete, modify objects or connect to proxy. They do not limit requests to read objects.
43+
## Admission control phases
3644

3745
The admission control process proceeds in two phases. In the first phase,
3846
mutating admission controllers are run. In the second phase, validating
@@ -52,7 +60,7 @@ other admission controllers.
5260

5361
## Why do I need them?
5462

55-
Many advanced features in Kubernetes require an admission controller to be enabled in order
63+
Several important features of Kubernetes require an admission controller to be enabled in order
5664
to properly support the feature. As a result, a Kubernetes API server that is not properly
5765
configured with the right set of admission controllers is an incomplete server and will not
5866
support all the features you expect.
@@ -91,7 +99,7 @@ To see which admission plugins are enabled:
9199
kube-apiserver -h | grep enable-admission-plugins
92100
```
93101

94-
In the current version, the default ones are:
102+
In Kubernetes {{< skew currentVersion >}}, the default ones are:
95103

96104
```shell
97105
CertificateApproval, CertificateSigning, CertificateSubjectRestriction, DefaultIngressClass, DefaultStorageClass, DefaultTolerationSeconds, LimitRanger, MutatingAdmissionWebhook, NamespaceLifecycle, PersistentVolumeClaimResize, PodSecurity, Priority, ResourceQuota, RuntimeClass, ServiceAccount, StorageObjectInUseProtection, TaintNodesByCondition, ValidatingAdmissionWebhook
@@ -103,18 +111,18 @@ CertificateApproval, CertificateSigning, CertificateSubjectRestriction, DefaultI
103111

104112
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
105113

106-
This admission controller allows all pods into the cluster. It is deprecated because
114+
This admission controller allows all pods into the cluster. It is **deprecated** because
107115
its behavior is the same as if there were no admission controller at all.
108116

109117
### AlwaysDeny {#alwaysdeny}
110118

111119
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
112120

113-
Rejects all requests. AlwaysDeny is DEPRECATED as it has no real meaning.
121+
Rejects all requests. AlwaysDeny is **deprecated** as it has no real meaning.
114122

115123
### AlwaysPullImages {#alwayspullimages}
116124

117-
This admission controller modifies every new Pod to force the image pull policy to Always. This is useful in a
125+
This admission controller modifies every new Pod to force the image pull policy to `Always`. This is useful in a
118126
multitenant cluster so that users can be assured that their private images can only be used by those
119127
who have the credentials to pull them. Without this admission controller, once an image has been pulled to a
120128
node, any pod from any user can use it by knowing the image's name (assuming the Pod is
@@ -124,8 +132,8 @@ required.
124132

125133
### CertificateApproval {#certificateapproval}
126134

127-
This admission controller observes requests to 'approve' CertificateSigningRequest resources and performs additional
128-
authorization checks to ensure the approving user has permission to `approve` certificate requests with the
135+
This admission controller observes requests to approve CertificateSigningRequest resources and performs additional
136+
authorization checks to ensure the approving user has permission to **approve** certificate requests with the
129137
`spec.signerName` requested on the CertificateSigningRequest resource.
130138

131139
See [Certificate Signing Requests](/docs/reference/access-authn-authz/certificate-signing-requests/) for more
@@ -134,7 +142,7 @@ information on the permissions required to perform different actions on Certific
134142
### CertificateSigning {#certificatesigning}
135143

136144
This admission controller observes updates to the `status.certificate` field of CertificateSigningRequest resources
137-
and performs an additional authorization checks to ensure the signing user has permission to `sign` certificate
145+
and performs an additional authorization checks to ensure the signing user has permission to **sign** certificate
138146
requests with the `spec.signerName` requested on the CertificateSigningRequest resource.
139147

140148
See [Certificate Signing Requests](/docs/reference/access-authn-authz/certificate-signing-requests/) for more
@@ -159,7 +167,7 @@ must revisit their `IngressClass` objects and mark only one as default (with the
159167
"ingressclass.kubernetes.io/is-default-class"). This admission controller ignores any `Ingress`
160168
updates; it acts only on creation.
161169

162-
See the [ingress](/docs/concepts/services-networking/ingress/) documentation for more about ingress
170+
See the [Ingress](/docs/concepts/services-networking/ingress/) documentation for more about ingress
163171
classes and how to mark one as default.
164172

165173
### DefaultStorageClass {#defaultstorageclass}
@@ -181,7 +189,7 @@ storage classes and how to mark a storage class as default.
181189

182190
This admission controller sets the default forgiveness toleration for pods to tolerate
183191
the taints `notready:NoExecute` and `unreachable:NoExecute` based on the k8s-apiserver input parameters
184-
`default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` if the pods don't already
192+
`default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` if the pods don't already
185193
have toleration for taints `node.kubernetes.io/not-ready:NoExecute` or
186194
`node.kubernetes.io/unreachable:NoExecute`.
187195
The default value for `default-not-ready-toleration-seconds` and `default-unreachable-toleration-seconds` is 5 minutes.
@@ -206,7 +214,7 @@ This admission controller is disabled by default.
206214
{{< feature-state for_k8s_version="v1.13" state="alpha" >}}
207215

208216
This admission controller mitigates the problem where the API server gets flooded by
209-
event requests. The cluster admin can specify event rate limits by:
217+
requests to store new Events. The cluster admin can specify event rate limits by:
210218

211219
* Enabling the `EventRateLimit` admission controller;
212220
* Referencing an `EventRateLimit` configuration file from the file provided to the API
@@ -223,7 +231,7 @@ plugins:
223231

224232
There are four types of limits that can be specified in the configuration:
225233

226-
* `Server`: All event requests received by the API server share a single bucket.
234+
* `Server`: All Event requests (creation or modifications) received by the API server share a single bucket.
227235
* `Namespace`: Each namespace has a dedicated bucket.
228236
* `User`: Each user is allocated a bucket.
229237
* `SourceAndObject`: A bucket is assigned by each combination of source and
@@ -266,7 +274,7 @@ The ImagePolicyWebhook admission controller allows a backend webhook to make adm
266274
267275
This admission controller is disabled by default.
268276
269-
#### Configuration File Format
277+
#### Configuration file format {#imagereview-config-file-format}
270278
271279
ImagePolicyWebhook uses a configuration file to set options for the behavior of the backend.
272280
This file may be json or yaml and has the following format:
@@ -377,8 +385,8 @@ An example request body:
377385
}
378386
```
379387

380-
The remote service is expected to fill the `ImageReviewStatus` field of the request and
381-
respond to either allow or disallow access. The response body's `spec` field is ignored and
388+
The remote service is expected to fill the `status` field of the request and
389+
respond to either allow or disallow access. The response body's `spec` field is ignored, and
382390
may be omitted. A permissive response would return:
383391

384392
```json
@@ -529,9 +537,9 @@ permissions required to operate correctly.
529537
### OwnerReferencesPermissionEnforcement {#ownerreferencespermissionenforcement}
530538

531539
This admission controller protects the access to the `metadata.ownerReferences` of an object
532-
so that only users with "delete" permission to the object can change it.
540+
so that only users with **delete** permission to the object can change it.
533541
This admission controller also protects the access to `metadata.ownerReferences[x].blockOwnerDeletion`
534-
of an object, so that only users with "update" permission to the `finalizers`
542+
of an object, so that only users with **update** permission to the `finalizers`
535543
subresource of the referenced *owner* can change it.
536544

537545
### PersistentVolumeClaimResize {#persistentvolumeclaimresize}
@@ -568,12 +576,12 @@ For more information about persistent volume claims, see [PersistentVolumeClaims
568576
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
569577

570578
This admission controller automatically attaches region or zone labels to PersistentVolumes
571-
as defined by the cloud provider (for example, GCE or AWS).
579+
as defined by the cloud provider (for example, Azure or GCP).
572580
It helps ensure the Pods and the PersistentVolumes mounted are in the same
573581
region and/or zone.
574582
If the admission controller doesn't support automatic labelling your PersistentVolumes, you
575583
may need to add the labels manually to prevent pods from mounting volumes from
576-
a different zone. PersistentVolumeLabel is DEPRECATED and labeling persistent volumes has been taken over by
584+
a different zone. PersistentVolumeLabel is **deprecated** as labeling for persistent volumes has been taken over by
577585
the {{< glossary_tooltip text="cloud-controller-manager" term_id="cloud-controller-manager" >}}.
578586

579587
This admission controller is disabled by default.
@@ -745,7 +753,8 @@ pod privileges.
745753

746754
This admission controller implements automation for
747755
[serviceAccounts](/docs/tasks/configure-pod-container/configure-service-account/).
748-
We strongly recommend using this admission controller if you intend to make use of Kubernetes
756+
The Kubernetes project strongly recommends enabling this admission controller.
757+
You should enable this admission controller if you intend to make any use of Kubernetes
749758
`ServiceAccount` objects.
750759

751760
### StorageObjectInUseProtection

0 commit comments

Comments
 (0)