Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ccf73d69
Commit
ccf73d69
authored
Jun 11, 2015
by
Abhi Shah
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8981 from erictune/docs7
Document what happens when pod uses nonexistent secret.
parents
06c96597
c11127c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
secrets.md
docs/secrets.md
+17
-8
No files found.
docs/secrets.md
View file @
ccf73d69
...
@@ -89,14 +89,23 @@ versions of Kubernetes are expected to provide more automation for populating
...
@@ -89,14 +89,23 @@ versions of Kubernetes are expected to provide more automation for populating
environment variables from files.
environment variables from files.
## Changes to Secrets
## Secret and Pod Lifetime interaction
Once a pod is created, its secret volumes will not change, even if the secret
When a pod is created via the API, there is no check whether a referenced
resource is modified. To change the secret used, the original pod must be
secret exists. Once a pod is scheduled, the kubelet will try to fetch the
deleted, and a new pod (perhaps with an identical PodSpec) must be created.
secret value. If the secret cannot be fetched because it does not exist or
Therefore, updating a secret follows the same workflow as deploying a new
because of a temporary lack of connection to the API server, kubelet will
container image. The
`kubectl rolling-update`
command can be used (
[
man
periodically retry. It will report an event about the pod explaining the
page](kubectl_rolling-update.md)).
reason it is not started yet. Once the a secret is fetched, the kubelet will
create and mount a volume containing it. None of the pod's containers will
start until all the pod's volumes are mounted.
Once the kubelet has started a pod's containers, its secret volumes will not
change, even if the secret resource is modified. To change the secret used,
the original pod must be deleted, and a new pod (perhaps with an identical
PodSpec) must be created. Therefore, updating a secret follows the same
workflow as deploying a new container image. The
`kubectl rolling-update`
command can be used (
[
man page
](
kubectl_rolling-update.md
)
).
The resourceVersion of the secret is not specified when it is referenced.
The resourceVersion of the secret is not specified when it is referenced.
Therefore, if a secret is updated at about the same time as pods are starting,
Therefore, if a secret is updated at about the same time as pods are starting,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment