• Remove resources from the terraform state without deleting them

    3 min read

    terraform state remove resource terraform state rm

    Terraform keeps a list of managed objects on it's state, if for some reason we no longer want terraform to manage them we can remove them from the code base. Doing so we will see how terraform will try to delete them:

    $ terraform plan
    (...)
    Plan: 0 to add, 0 to change, 10 to destroy.
    (...)
    

    30/04/2021

    Read more...
  • kubectl uncordon: mark node as schedulable

    1 min read

    uncordon kubectl

    Using kubectl drain you can evict pods and disabled scheduling for a node so you can proceed with some maintenance. Once this maintenance is over we will need to allow pods to be scheduled to this node, removing the SchedulingDisabled:

    $ kubectl get nodes
    NAME                    STATUS                     ROLES                  AGE     VERSION
    nauvoo.pet2cattle.com   Ready                      control-plane,master   19d     v1.20.4+k3s1
    tycho.pet2cattle.com    Ready,SchedulingDisabled   <none>                 9m25s   v1.20.4+k3s1
    

    29/04/2021

    Read more...
  • AWS CLI manage files on an S3 bucket

    2 min read

    Using the AWS CLI we can perform most operations for files sitting on a S3 bucket such as: list, copy, rename, cat, etc...

    28/04/2021

    Read more...
  • kubernetes: Adding initContainers to a pod

    2 min read

    initContainers pod kubectl

    When setting up a pod we might need to populate some shared storage or generate some configuration files to be used for the actual containers that are going to run on that pod. It might not make sense that some tools just required for the setting up the environment to be available on the final container. Futhermore, we might need to run some scripts with higher privileges than we really need for running the pod. The initContainers come handy for covering this use-cases.

    27/04/2021

    Read more...
  • git: Apply commit to another branch

    2 min read

    When we have a change (commit) that we want to apply to several branches we can use git cherry-pick.

    26/04/2021

    Read more...

More recent...

Older content...