Difference between revisions of "Kubernetes restartPolicy"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
Line 17: | Line 17: | ||
* <code>[[autoScaler:]]</code> | * <code>[[autoScaler:]]</code> | ||
* <code>[[kubectl get pods -o json]]</code> | * <code>[[kubectl get pods -o json]]</code> | ||
+ | * [[dnsPolicy]] | ||
== See also == | == See also == |
Revision as of 05:58, 29 March 2023
restartPolicy:
Always, OnFailure
, andNever
.
PodStatus: PodScheduled, ContainersReady, Initialized, Ready
kubectl get deployments -o json -A | grep restartPolicy
Container restartPolicy
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
- Docker restartPolicy
- Kubernetes Pod Lifecycle
resources:
autoScaler:
kubectl get pods -o json
- dnsPolicy
See also
- Kubernetes restartPolicy,
resources:, autoScaler:
- Kubernetes deployments, strategies:
kind: Deployment
, Strategies:Recreate
orRollingUpdate
,kubectl
[create | describe | get | scale | rollout | deployment/
], Kubernetes Canary Deployments,deployment.kubernetes.io
- Pods:
kubectl apply
,kubectl [ pod get | top | delete | describe pods ]
,InitContainers, PodInitializing, CrashLoopBackOff, ImagePullPolicy:, NodeAffinity, NodeSelector, Terminated
Advertising: