Skip to content

Commit 8c9c9c5

Browse files
committed
static pod not support configmap or secret
1 parent 4aa2b6d commit 8c9c9c5

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

content/en/docs/concepts/configuration/configmap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ You can write a Pod `spec` that refers to a ConfigMap and configures the contain
6161
in that Pod based on the data in the ConfigMap. The Pod and the ConfigMap must be in
6262
the same {{< glossary_tooltip text="namespace" term_id="namespace" >}}.
6363

64+
{{< note >}}
65+
The `spec` of a {{< glossary_tooltip text="static Pod" term_id="static-pod" >}} cannot refer to a ConfigMap
66+
or any other API objects.
67+
{{< /note >}}
68+
6469
Here's an example ConfigMap that has some keys with single values,
6570
and other keys where the value looks like a fragment of a configuration
6671
format.

content/en/docs/concepts/configuration/secret.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,10 @@ are obtained from the API server.
822822
This includes any Pods created using `kubectl`, or indirectly via a replication
823823
controller. It does not include Pods created as a result of the kubelet
824824
`--manifest-url` flag, its `--config` flag, or its REST API (these are
825-
not common ways to create Pods.)
825+
not common ways to create Pods).
826+
The `spec` of a {{< glossary_tooltip text="static Pod" term_id="static-pod" >}} cannot refer to a Secret
827+
or any other API objects.
828+
826829

827830
Secrets must be created before they are consumed in Pods as environment
828831
variables unless they are marked as optional. References to secrets that do

content/en/docs/concepts/workloads/pods/_index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ on the Kubernetes API server for each static Pod.
282282
This means that the Pods running on a node are visible on the API server,
283283
but cannot be controlled from there.
284284

285+
{{< note >}}
286+
The `spec` of a static Pod cannot refer to other API objects
287+
(e.g., {{< glossary_tooltip text="ServiceAccount" term_id="service-account" >}},
288+
{{< glossary_tooltip text="ConfigMap" term_id="configmap" >}},
289+
{{< glossary_tooltip text="Secret" term_id="secret" >}}, etc).
290+
{{< /note >}}
291+
285292
## Container probes
286293

287294
A _probe_ is a diagnostic performed periodically by the kubelet on a container. To perform a diagnostic, the kubelet can invoke different actions:

content/en/docs/tasks/configure-pod-container/static-pod.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ Pods to run a Pod on every node, you should probably be using a
3131
instead.
3232
{{< /note >}}
3333

34+
{{< note >}}
35+
The `spec` of a static Pod cannot refer to other API objects
36+
(e.g., {{< glossary_tooltip text="ServiceAccount" term_id="service-account" >}},
37+
{{< glossary_tooltip text="ConfigMap" term_id="configmap" >}},
38+
{{< glossary_tooltip text="Secret" term_id="secret" >}}, etc).
39+
{{< /note >}}
40+
3441
## {{% heading "prerequisites" %}}
3542

3643
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}

0 commit comments

Comments
 (0)