• Declaratively create a kubernetes pod using kubectl (for docker administrators)

    2 min read

    kubernetes create pod

    The first thing one want to try once we have access to a Kubernetes cluster is to run a pod in it. Let's try to create our first pod on kubernetes, declaratively: meaning that we will be writing a manifest to do it.

    31/03/2021

    Read more...
  • tcpdump: filter DNS queries

    2 min read

    When a DNS change is involved in an ongoing issue, we need to be sure when we use, for example curl, whether we are hitting the new or the old resource. Is that DNS record still cached locally? One of the best ways of checking this is by sniffing the DNS traffic using tcpdump

    30/03/2021

    Read more...
  • Imperatively create a kubernetes pod using kubectl

    1 min read

    kubernetes create pod

    Just as an hello-world equivalent, first thing one want to try to start learning how to use a Kubernetes cluster is to run a pod in it. Let's try to create our first pod on kubernetes just as we would do with docker for running a container

    29/03/2021

    Read more...
  • Helm: Get the values.yaml config template

    2 min read

    helm show values defaults

    To configure a helm chart one of the firsts steps always is to set our customizations. To do se we will need to retrive the default values.yaml. To set the values using the --set option is not really practical and can lead to errors if we push changes forgetting to set some values

    26/03/2021

    Read more...
  • Using helm from terraform

    2 min read

    terraform helm resource

    When it comes into configuring a helm chart using terraform we can configure it's values in two different ways: By using set or by pushing a template with it's values. Let's take a look:

    25/03/2021

    Read more...
  • How to get EC2 instance ID and other metadata

    1 min read

    On an EC2 instance we can retrieve some of it's metadata by using curl. Let's see how

    24/03/2021

    Read more...
  • Using data sources for retrieving data from not managed resources

    2 min read

    terraform data

    Using data sources on terraform allows us to make use of information not managed by Terraform, or defined by another separate Terraform codebase. We can use it for any resource os even an entire terraform remote state

    Let's dive in

    23/03/2021

    Read more...
  • ALB Ingress: redirect traffic to HTTPS

    2 min read

    One of the beauties of using an ALB Ingress controller on AWS is that you can configure SSL certificates for your Ingress by just defining you want to use HTTPS

    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      annotations:
        kubernetes.io/ingress.class: alb
        alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
    

    But this is going to serve the same content using HTTP and HTTPS. Configuring a SSL redirect it is also pretty straightforward but involves two steps:

    22/03/2021

    Read more...
  • How to install packages on alpine-based containers

    2 min read

    containers alpine package

    Whether you are running containers on Kubernetes or in docker you might need to install packages on the running containers. You will notice that most of them are based on Alpine Linux because of its small size.

    Alpine Linux is a distribution based on musl and BusyBox with its own package-management system, apk-tools.

    19/03/2021

    Read more...
  • Using the nodeSelector for selecting a kubernetes cluster partition

    4 min read

    kubernetes pod nodeSelector scheduler

    On a kubernetes cluster not all nodes are expected to have the same amount of resources so we might need to schedule some pods on specific nodes due to the resources they have (for example access to a GPU) or due to the network connectivity they have (for example edge nodes). Using nodeSelector we can the scheduler how we want out pods to be scheduled

    18/03/2021

    Read more...

Older content...

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