🎉 I'm releasing 12 products in 12 months! If you love product, checkout my new blog workingoutloud.dev

Back to home

Kubernetes Healthchecks

    If the application malfunctions, the pod and container may still be running but the application may no longer be running. This is where health checks come in.

    Two types of health checks

    1. Running a command in the container periodically
    2. Periodic checks on a URL

    The typical prod application behind a load balancer should always have health checks implemented in some way to ensure availability and resiliency.

    Below you can see where the healthcheck is. You can check the port or container port name.

    # pod-helloworld.yml apiVersion: v1 kind: Pod metadata: name: nodehelloworld.example.com labels: app: helloworld spec: # The containers are listed here containers: - name: k8s-demo image: okeeffed/docker-demo ports: - containerPort: 3000 # ! This is the health check livenessProbe: httpGet: path: / port: 3000 initialDelaySeconds: 15 timeoutSeconds: 30

    More explicit information can be found here.

    Personal image

    Dennis O'Keeffe

    @dennisokeeffe92
    • Melbourne, Australia

    Hi, I am a professional Software Engineer. Formerly of Culture Amp, UsabilityHub, Present Company and NightGuru.
    I am currently working on Visibuild.

    1,200+ PEOPLE ALREADY JOINED ❤️️

    Get fresh posts + news direct to your inbox.

    No spam. We only send you relevant content.

    Kubernetes Healthchecks

    Introduction

    Share this post