• Set command arguments with environment variables

    2 min read

    kubernetes pod argument command environment variable

    When configuring command line arguments for containers we might need to be able to use certain values that might be elsewhere like the name of the current namespace.

    We can use environment variables as the source of the information without having to write a wrappet to actually populate them

    26/08/2022

    Read more...
  • Dynamically provisioned PersistentVolumes using StatefulSet

    6 min read

    kubernetes PersistentVolume Deployment StatefulSet

    The basic idea behind a StatefulSet is to be able to manage stateful workloads on Kubernetes, unlike Deployments, creating a unique identity for each Pod using a common spec.

    With this in mind we might just copy the Pod's template from a Deployment to a StatefulSet object to make it stateful, but it's not always quite that simple.

    21/02/2022

    Read more...
  • What's a Kubernetes Deployment object?

    2 min read

    kubernetes Deployment

    Maybe the most common object used for deploying applications on Kubernetes is the Deployment object. It is intended to provide declarative updates for Pods at a controlled rate.

    With a Deployment we are setting the desired state of a ReplicaSet. The Deployment controller will take the appropriate actions to adjust the ReplicaSet so it has the correct amount of Pods

    09/08/2021

    Read more...
  • Kubernetes deployment strategies

    2 min read

    kubernetes Deployment RollingUpdate Recreate

    To update a Deployment objects we can choose between two built-in strategies used to replace old Pods by new ones: Recreate and RollingUpdate

    Let's see the differences between them

    04/08/2021

    Read more...
  • Using an HPA object to autoscale a deployment based on it's Pods CPU metrics

    3 min read

    kubernetes autoscale deployment CPU metrics

    On Kubernetes, scaling an application is just a matter of defining how many replicas we want:

    $ kubectl scale deployment/demo --replicas=5
    deployment.apps/demo scaled
    

    Having to manually adjust the number of replicas is not really practical. Here's where the HorizontalPodAutoscaler (HPA) comes into play

    01/07/2021

    Read more...

Older content...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets