You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page provides an overview of PodPresets, which are objects for injecting
11
13
certain information into pods at creation time. The information can include
12
14
secrets, volumes, volume mounts, and environment variables.
13
15
{{% /capture %}}
14
16
15
17
16
18
{{% capture body %}}
17
-
## Understanding Pod Presets
19
+
## Understanding Pod presets
18
20
19
-
A `Pod Preset` is an API resource for injecting additional runtime requirements
21
+
A PodPreset is an API resource for injecting additional runtime requirements
20
22
into a Pod at creation time.
21
23
You use [label selectors](/docs/concepts/overview/working-with-objects/labels/#label-selectors)
22
-
to specify the Pods to which a given Pod Preset applies.
24
+
to specify the Pods to which a given PodPreset applies.
23
25
24
-
Using a Pod Preset allows pod template authors to not have to explicitly provide
26
+
Using a PodPreset allows pod template authors to not have to explicitly provide
25
27
all information for every pod. This way, authors of pod templates consuming a
26
28
specific service do not need to know all the details about that service.
27
29
28
-
For more information about the background, see the [design proposal for PodPreset](https://git.k8s.io/community/contributors/design-proposals/service-catalog/pod-preset.md).
29
30
30
-
## How It Works
31
+
## Enable PodPreset in your cluster {#enable-pod-preset}
32
+
33
+
In order to use Pod presets in your cluster you must ensure the following:
34
+
35
+
1. You have enabled the API type `settings.k8s.io/v1alpha1/podpreset`. For
36
+
example, this can be done by including `settings.k8s.io/v1alpha1=true` in
37
+
the `--runtime-config` option for the API server. In minikube add this flag
38
+
`--extra-config=apiserver.runtime-config=settings.k8s.io/v1alpha1=true` while
39
+
starting the cluster.
40
+
1. You have enabled the admission controller `PodPreset`. One way to doing this
41
+
is to include `PodPreset` in the `--enable-admission-plugins` option value specified
1. You have defined your Pod Presets by creating `PodPreset` objects in the
84
-
namespace you will use.
85
-
86
85
{{% /capture %}}
87
86
88
87
{{% capture whatsnext %}}
89
88
90
-
* [Injecting data into a Pod using PodPreset](/docs/tasks/inject-data-application/podpreset/)
89
+
See [Injecting data into a Pod using PodPreset](/docs/tasks/inject-data-application/podpreset/)
90
+
91
+
For more information about the background, see the [design proposal for PodPreset](https://git.k8s.io/community/contributors/design-proposals/service-catalog/pod-preset.md).
This page shows how to use PodPreset objects to inject information like {{< glossary_tooltip text="Secrets" term_id="secret" >}}, volume mounts, and {{< glossary_tooltip text="environment variables" term_id="container-env-variables" >}} into Pods at creation time.
13
15
14
16
{{% /capture %}}
15
17
16
18
{{% capture prerequisites %}}
17
19
18
-
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
20
+
You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. If you do not already have a cluster, you can create one using [Minikube](/docs/setup/learning-environment/minikube/).
21
+
Make sure that you have [enabled PodPreset](/docs/concepts/workloads/pods/podpreset/#enable-pod-preset) in your cluster.
0 commit comments