Difference between revisions of "Kubernetes restartPolicy"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 22: Line 22:
 
* <code>[[dnsPolicy]]</code>
 
* <code>[[dnsPolicy]]</code>
 
* [[Kubernetes probes]]
 
* [[Kubernetes probes]]
 +
* [[CrashLoopBackOff]]
 +
* [[Liveness-exec with sidecar container]]
  
 
== See also ==
 
== See also ==

Latest revision as of 11:10, 22 October 2024

  • PodStatus: PodScheduled, ContainersReady, Initialized, Ready

Container restartPolicy[edit]

 apiVersion: v1
kind: Pod
metadata:
  name: secret-env-pod
spec:
  containers:
  - name: mycontainer
    image: redis
    env:
      - name: SECRET_USERNAME
        valueFrom:
          secretKeyRef:
            name: mysecret
            key: username
            optional: false # same as default; "mysecret" must exist
                            # and include a key named "username"
      - name: SECRET_PASSWORD
        valueFrom:
          secretKeyRef:
            name: mysecret
            key: password
            optional: false # same as default; "mysecret" must exist
                            # and include a key named "password"
  restartPolicy: Never

Related[edit]

See also[edit]

Advertising: