• Helm diff using a plugin

    3 min read

    helm upgrade diff

    Just as with kubectl diff, there's a helm plugin that helm us to the the actual differences that it will apply to the kubernetes cluster without much of the clutter that we will find by combining kubectl diff with the yaml output of a helm dry-run

    15/01/2021

    Read more...
  • Create a yaml template using kubectl

    2 min read

    kubectl yaml template dry-run

    When you create a new deployment you usually focus on:

    • Number of replicas
    • How you are going to select the pods that are going to be managed by this deployment
    • Pod template

    Beside this, all the other required lines on the yaml are boilerplate so it's quite easy to forget about them.

    14/01/2021

    Read more...
  • Installing kubectl plugin with krew: unused-pvc

    2 min read

    kubernetes plugins krew unused-volumes

    Krew is a plugin manager for kubectl (v1.12 or higher), we will need to install krew first. To be able to test the unused-volumes plugin we will have to create a PersistentVolumeClaim that we won't use on any pot:

    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: demo-pvc
      namespace: kube-system
    spec:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 10Gi
    

    13/01/2021

    Read more...
  • helm: set a value for a dependency

    2 min read

    kubernetes helm chart dependency

    If you are writing a helm chart, it makes no sense to add all the yaml files on your helm chart when there's already a helm chart for some of the components: It's always best to reuse existing code so including another chart as dependency will deploy all the related yaml files.

    dependencies:
      - name: minio
        version: 8.0.8
        repository: https://helm.min.io/
    

    Nevertheless, how do we change a default value for the chart we add as dependency?

    12/01/2021

    Read more...
  • Get YAML for deployed Kubernetes objects

    2 min read

    kubernetes object yaml kubectl

    In case we have some objects on the kubernetes cluster that we want to modify but we don't have the original yaml, we can retrieve the object in yaml format from the cluster using kubectl

    11/01/2021

    Read more...
  • helm's dry-run mode to render yaml files without applying them

    2 min read

    kubernetes helm yaml dry-run helm chart

    When you are installing or upgrading a helm chart sometimes feels like an act of faith: You don't really know what it's going to actually deploy. With the --dry-run option

    08/01/2021

    Read more...
  • Preview changes before applying a yaml file to a kubernetes cluster

    3 min read

    kubernetes diff change

    Applying changes to a kubernetes cluster using yaml files it's very similar to applying changes to source code: It's always best to have the diff for being able to actually see the changed that we are going to make.

    07/01/2021

    Read more...
  • Usage of git stash

    2 min read

    While working on a change it can happen that someone else have updated the remote repository with completely unrelated changes. Instead of having to perform a merge commit we can download the changes to apply our changes on top of that commit.

    06/01/2021

    Read more...
  • Access kubernetes secrets as volumes

    2 min read

    kubernetes secret volume pod deployment mount

    To be able to use a secret on a Deployment (or generally speaking, any pod) we can choose to share it by using either volumes or environment variables. Let's take a look hwo it would look like using an volume mount.

    05/01/2021

    Read more...
  • kubectl top

    2 min read

    kubernetes kubectl cpu memory metrics-server

    If we have the metrics-server installed on our kubernetes cluster, we can use kubectl to see the amount of resources out pods are using and how much loaded are our worker nodes

    04/01/2021

    Read more...

More recent...

Older content...

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