Difference between revisions of "LivenessProbe"

From wikieduonline
Jump to navigation Jump to search
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{lc}}
 
  [[kubectl describe]] pod liveness-http
 
  [[kubectl describe]] pod liveness-http
 
  Error from server (NotFound): pods "liveness-http" not found
 
  Error from server (NotFound): pods "liveness-http" not found
Line 6: Line 7:
 
  [[helm show all grafana/grafana]]
 
  [[helm show all grafana/grafana]]
 
  .../...
 
  .../...
  readinessProbe:
+
  [[readinessProbe:]]
   httpGet:
+
   [[httpGet:]]
 
     path: /api/health
 
     path: /api/health
 
     port: 3000
 
     port: 3000
Line 20: Line 21:
 
  .../...
 
  .../...
  
 +
 +
{{Liveness official example}}
 +
 +
 +
[[Kubernetes v1.27]] ([[Apr 2023]]):
 +
{{GRPC liveness probe example}}
  
 
== Related ==
 
== Related ==
 
* <code>[[ReadinessProbe]]</code>
 
* <code>[[ReadinessProbe]]</code>
 +
* <code>[[kind: Pod]]</code>
 +
* <code>[[startupProbe]]</code>
 +
* <code>[[Unhealthy]]</code>
  
 
== See also ==
 
== See also ==
* {{K8s}}
+
* {{K8s probes}}
 +
* {{Pod}}
 +
* {{Pods}}
  
 
[[Category:K8s]]
 
[[Category:K8s]]

Latest revision as of 09:52, 1 May 2024

kubectl describe pod liveness-http
Error from server (NotFound): pods "liveness-http" not found


helm show all grafana/grafana
.../...
readinessProbe:
  httpGet:
    path: /api/health
    port: 3000

livenessProbe:
  httpGet:
    path: /api/health
    port: 3000
  initialDelaySeconds: 60
  timeoutSeconds: 30
  failureThreshold: 10
.../...


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


Kubernetes v1.27 (Apr 2023):

apiVersion: v1
kind: Pod
metadata:
  name: etcd-with-grpc
spec:
  containers:
  - name: etcd
    image: registry.k8s.io/etcd:3.5.1-0
    command: [ "/usr/local/bin/etcd", "--data-dir",  "/var/lib/etcd", "--listen-client-urls", "http://0.0.0.0:2379", "--advertise-client-urls", "http://127.0.0.1:2379", "--log-level", "debug"]
    ports:
    - containerPort: 2379
    livenessProbe:
      grpc:
        port: 2379
      initialDelaySeconds: 10

Related[edit]

See also[edit]

Advertising: