Difference between revisions of "Kubernetes probes"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
(24 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ | ||
− | |||
− | |||
− | + | [[probes:]] | |
− | + | * <code>[[readinessProbe]]</code> | |
+ | * <code>[[livenessProbe]]</code> | ||
+ | * <code>[[startupProbe]]</code> | ||
+ | |||
+ | Options: | ||
+ | * [[terminationGracePeriodSeconds]] | ||
+ | |||
+ | Check mechanisms: | ||
+ | * <code>[[exec:|exec]]</code> | ||
+ | * <code>[[grpc]]</code> | ||
+ | * <code>[[httpGet]]: [[httpHeaders]]</code> | ||
+ | * <code>[[tcpSocket]]</code> | ||
[[kind: Deployment]] | [[kind: Deployment]] | ||
+ | {{liveness-exec}} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | {{example probes}} | ||
+ | == Related == | ||
+ | * <code>[[Redis values.yml]]</code> | ||
+ | * <code>[[customStartupProbe]]</code> | ||
+ | * <code>[[customLivenessProbe]]</code> | ||
+ | * <code>[[customReadinessProbe]]</code> | ||
+ | * [[Kubernetes restartPolicy]] | ||
+ | * [[CrashLoopBackOff]] | ||
+ | * [[Unknown]] | ||
== See also == | == See also == | ||
* {{K8s probes}} | * {{K8s probes}} | ||
* {{K8s deployments}} | * {{K8s deployments}} | ||
+ | * {{K8s troubleshooting}} | ||
[[Category:K8s]] | [[Category:K8s]] |
Latest revision as of 08:23, 7 November 2024
Options:
Check mechanisms:
kind: Deployment
apiVersion: v1 kind: Pod metadata: labels: test: liveness name: liveness-exec spec: containers: - name: liveness image: registry.k8s.io/busybox args: - /bin/sh - -c - touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600 livenessProbe: exec: command: - cat - /tmp/healthy initialDelaySeconds: 5 periodSeconds: 5
readinessProbe: httpGet: path: /api/health port: 3000 livenessProbe: httpGet: path: /api/health port: 3000 initialDelaySeconds: 60 timeoutSeconds: 30 failureThreshold: 10
Related[edit]
Redis values.yml
customStartupProbe
customLivenessProbe
customReadinessProbe
- Kubernetes restartPolicy
- CrashLoopBackOff
- Unknown
See also[edit]
- K8s probes:
readinessProbe, livenessProbe, StartupProbe, exec, gRPC, HttpGet, tcpSocket, TerminationGracePeriodSeconds
- Kubernetes deployments, strategies:
kind: Deployment
, Strategies:Recreate
orRollingUpdate
,kubectl
[create | describe | get | scale | rollout | deployment/
], Kubernetes Canary Deployments,deployment.kubernetes.io
- K8s troubleshooting:
kubectl logs, kubectl top, kubectl get events -A, kubectl describe pod
, Liveness, Readiness,Kubernetes events
, Pulling image, OOMKilled, ProbeWarning, Reason,FailedScheduling
,errImagePull, ImagePullBackOff
, Kubelet conditions:MemoryPressure, DiskPressure, KubeletHasSufficientPID, KubeletReady, kubectl [ debug | attach | exec ] kubectl cluster-info dump, SimKube, KWOK
Advertising: