Skip to content

Commit 7331e54

Browse files
authored
Merge pull request #28623 from chenxuc/staticPod
static pod not support configmap or secret
2 parents 5f65b4f + 8c9c9c5 commit 7331e54

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
@@ -833,7 +833,10 @@ are obtained from the API server.
833833
This includes any Pods created using `kubectl`, or indirectly via a replication
834834
controller. It does not include Pods created as a result of the kubelet
835835
`--manifest-url` flag, its `--config` flag, or its REST API (these are
836-
not common ways to create Pods.)
836+
not common ways to create Pods).
837+
The `spec` of a {{< glossary_tooltip text="static Pod" term_id="static-pod" >}} cannot refer to a Secret
838+
or any other API objects.
839+
837840

838841
Secrets must be created before they are consumed in Pods as environment
839842
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
@@ -283,6 +283,13 @@ on the Kubernetes API server for each static Pod.
283283
This means that the Pods running on a node are visible on the API server,
284284
but cannot be controlled from there.
285285

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

288295
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)