All Projects → kubernetes-csi → livenessprobe

kubernetes-csi / livenessprobe

Licence: Apache-2.0 license
A sidecar container that can be included in a CSI plugin pod to enable integration with Kubernetes Liveness Probe.

Programming Languages

shell
77523 projects
Makefile
30231 projects
go
31211 projects - #10 most used programming language
python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to livenessprobe

driver-registrar
[Deprecated] Sidecar container that 1) registers the CSI driver with kubelet, and 2) adds the drivers custom NodeId to a label on the Kubernetes Node API Object
Stars: ✭ 19 (-54.76%)
Mutual labels:  k8s-sig-storage
container-object-storage-interface-spec
Container Object Storage (COSI) Specification
Stars: ✭ 39 (-7.14%)
Mutual labels:  k8s-sig-storage
external-resizer
Sidecar container that watches Kubernetes PersistentVolumeClaims objects and triggers controller side expansion operation against a CSI endpoint
Stars: ✭ 82 (+95.24%)
Mutual labels:  k8s-sig-storage
Longhorn
Cloud-Native distributed storage built on and for Kubernetes
Stars: ✭ 3,384 (+7957.14%)
Mutual labels:  k8s-sig-storage
Glusterfs
Gluster Filesystem : Build your distributed storage in minutes
Stars: ✭ 3,437 (+8083.33%)
Mutual labels:  k8s-sig-storage
csi-proxy
CSI Proxy utility to enable CSI Plugins on Windows
Stars: ✭ 28 (-33.33%)
Mutual labels:  k8s-sig-storage
node-driver-registrar
Sidecar container that registers a CSI driver with the kubelet using the kubelet plugin registration mechanism.
Stars: ✭ 63 (+50%)
Mutual labels:  k8s-sig-storage
csi-driver-nfs
This driver allows Kubernetes to access NFS server on Linux node.
Stars: ✭ 227 (+440.48%)
Mutual labels:  k8s-sig-storage
container-object-storage-interface-controller
Container Object Storage Interface (COSI) controller responsible to manage lifecycle of COSI objects.
Stars: ✭ 38 (-9.52%)
Mutual labels:  k8s-sig-storage
csi-driver-nvmf
CSI driver NVMf mainly supports RDMA and TCP for Software Defined Storage by NVMf
Stars: ✭ 28 (-33.33%)
Mutual labels:  k8s-sig-storage

Liveness Probe

The liveness probe is a sidecar container that exposes an HTTP /healthz endpoint, which serves as kubelet's livenessProbe hook to monitor health of a CSI driver.

The liveness probe uses Probe() call to check the CSI driver is healthy. See CSI spec for more information about Probe API call. Container Storage Interface (CSI)

Compatibility

This information reflects the head of this branch.

Compatible with CSI Version Container Image Min K8s Version
CSI Spec v1.0.0 registry.k8s.io/sig-storage/livenessprobe 1.13

Usage

See hostpath-with-livenessprobe.yaml for example how to use the liveness probe with a CSI driver. Notice that actual livenessProbe is set on the container with the CSI driver. This way, Kubernetes restarts the CSI driver container when the probe fails. The liveness probe sidecar container only provides the HTTP endpoint for the probe and does not contain livenessProbe section by itself.

kind: Pod
spec:
  containers:
  # Container with CSI driver
  - name: hostpath-driver
    image: quay.io/k8scsi/hostpathplugin:v0.2.0
    # Defining port which will be used to GET plugin health status
    # 9808 is default, but can be changed.
    ports:
    - containerPort: 9808
      name: healthz
      protocol: TCP
    # The probe
    livenessProbe:
      failureThreshold: 5
      httpGet:
        path: /healthz
        port: healthz
      initialDelaySeconds: 10
      timeoutSeconds: 3
      periodSeconds: 2
    volumeMounts:
    - mountPath: /csi
      name: socket-dir
  # ...
  # The liveness probe sidecar container
  - name: liveness-probe
    imagePullPolicy: Always
    image: registry.k8s.io/sig-storage/livenessprobe:v2.7.0
    args:
    - --csi-address=/csi/csi.sock
    volumeMounts:
    - mountPath: /csi
      name: socket-dir
    # ...

Command line options

Recommended optional arguments

  • --csi-address <path to CSI socket>: This is the path to the CSI driver socket inside the pod that the external-provisioner container will use to issue CSI operations (/run/csi/socket is used by default).

Other recognized arguments

  • --health-port <number>: TCP ports for listening for healthz requests (default "9808")

  • --probe-timeout <duration>: Maximum duration of single Probe() call (default "1s").

  • --metrics-address <port>: The TCP network address where the prometheus metrics endpoint will listen (example: :8080). The default is empty string, which means metrics endpoint is disabled.

  • --metrics-path <path>: The HTTP path where prometheus metrics will be exposed. Default is /metrics."

  • --http-endpoint <endpoint>: The TCP network address where the HTTP server for diagnostics, including CSI driver health check and metrics. The default is empty string, which means the server is disabled.

  • All glog / klog arguments are supported, such as -v <log level> or -alsologtostderr.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].