Difference between revisions of "Template:Liveness official example"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<pre> apiVersion: v1 kind: Pod metadata: labels: test: liveness name: liveness-http spec: containers: - name: liveness image: registry.k8s.io/e2e-test-images/a...")
 
Line 1: Line 1:
<pre>
+
apiVersion: v1
apiVersion: v1
+
kind: Pod
kind: Pod
+
metadata:
metadata:
+
  labels:
  labels:
+
    test: liveness
    test: liveness
+
  name: liveness-http
  name: liveness-http
+
spec:
spec:
+
  containers:
  containers:
+
  - name: liveness
  - name: liveness
+
    image: registry.k8s.io/e2e-test-images/agnhost:2.40
    image: registry.k8s.io/e2e-test-images/agnhost:2.40
+
    args:
    args:
+
    - liveness
    - liveness
+
    [[livenessProbe]]:
    livenessProbe:
+
      httpGet:
      httpGet:
+
        path: /healthz
        path: /healthz
+
        port: 8080
        port: 8080
+
        httpHeaders:
        httpHeaders:
+
        - name: Custom-Header
        - name: Custom-Header
+
          value: Awesome
          value: Awesome
+
      initialDelaySeconds: 3
      initialDelaySeconds: 3
+
      periodSeconds: 3
      periodSeconds: 3
 
 
 
</pre>
 

Revision as of 09:47, 1 May 2024

apiVersion: v1
kind: Pod
metadata:
  labels:
    test: liveness
  name: liveness-http
spec:
  containers:
  - name: liveness
    image: registry.k8s.io/e2e-test-images/agnhost:2.40
    args:
    - liveness
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
        httpHeaders:
        - name: Custom-Header
          value: Awesome
      initialDelaySeconds: 3
      periodSeconds: 3

Advertising: