Is there a health endpoint available in k6?

Hi I am running k6 as a pod in the kubernetes
was wondering if there is any health endpoint avaialble

thanks

Hi @Prasanth

Not sure how you configure your pod, though I imagine you can use the status endpoint while k6 is running, if you publish the port: k6 REST API

I hope this helps. If you need further assistance kindly share the deployment details.

Cheers!

1 Like
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: k6
    app.kubernetes.io/name: k6
  name: k6
  namespace: k6
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: k6
      app.kubernetes.io/name: k6
  template:
    metadata:
      labels:
        app.kubernetes.io/component: k6
        app.kubernetes.io/name: k6
    spec:
      containers:
        - image: dependencies.openet.com:5000/loadimpact/k6:0.42.0
          command:
            - sleep
            - infinity
          name: k6
          resources:
            limits:
              cpu: 6
              memory: 3Gi
            requests:
              cpu: 2
              memory: 250Mi
          volumeMounts:
            - name: k6-scripts
              mountPath: /home/k6
      volumes:
        - name: k6-scripts
          configMap:
            name: k6-scripts-configmap
            defaultMode: 0777

:wave: You might find it helpful that k6-operator has just recently added the liveness and readiness probes implementation to k6 runners:

1 Like