Difference between revisions of "Kubernetes restartPolicy"

From wikieduonline
Jump to navigation Jump to search
Line 16: Line 16:
 
* <code>[[resources:]]</code>
 
* <code>[[resources:]]</code>
 
* <code>[[autoScaler:]]</code>
 
* <code>[[autoScaler:]]</code>
* <code>[[kubectl get pods]]</code>
+
* <code>[[kubectl get pods -o json]]</code>
  
 
== See also ==
 
== See also ==

Revision as of 09:49, 12 October 2022


  • PodStatus: PodScheduled, ContainersReady, Initialized, Ready

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

See also

Advertising: