• Operator-SDK: Create a group of objects that can be queried together

    2 min read

    Operator-SDK CustomResourceDefinition categories groups

    When you have several kubernetes objects (CRDs) that work together it can be useful to be able to query them all together to get a better idea of what's deployed without having to query all the individial resources. With operator-SDK we just need to annotate the objects.

    01/08/2023

    Read more...
  • Simplifying Input Parameters in Pulumi and AWS CDK Libraries

    2 min read

    Pulumi AWS CDK input parameters string pointers

    Some libraries require you to use string pointers or custom objects for some input parameters, notable examples are Pulumi and AWS CDK. If we only need to provide some static value for it can be annoying to use.

    16/05/2023

    Read more...
  • Operator-SDK: Set custom fields for kubectl get

    2 min read

    Kubernetes Operator-SDK CustomResourceDefinition additionalPrinterColumns get fields

    When writing a custom Kubernetes operator using operator-sdk we might want to change the fields are show when running kubectl get:

    $ kubectl get example
    NAME   AGE
    demo   4h20m
    

    To do so, we'll need to add the additionalPrinterColumns field the the CustomResourceDefinition, but since we are using operator-sdk to take care of this, we'll need to use some annotations in the resource definition file.

    15/05/2023

    Read more...
  • Deploying Cloud Resources with Pulumi and LocalStack

    2 min read

    Pulumi AWS LocalStack golang

    Pulumi is a powerful infrastructure as code tool that allows developers to deploy and manage cloud resources using familiar programming languages. However, when it comes to using Pulumi with LocalStack, there are some changes that need to be made to make Pulumi be able to reach LocalStack.

    25/04/2023

    Read more...
  • How to Change the Scope of a Kubernetes API Resource with Operator-SDK

    2 min read

    Kubernetes API Resource Operator-SDK CustomResourceDefinition Namespaced Cluster Scope

    When creating a new API resource using the operator-sdk we can use the namespaced flag to make it Namespaced:

    $ operator-sdk create api --group group \
                              --version v1 \
                              --kind Example \
                              --resource \
                              --controller
    

    Or in the cluster scope:

    $ operator-sdk create api --group group \
                              --version v1 \
                              --kind Example \
                              --resource \
                              --controller \
                              --namespaced=false
    

    Maybe because we forgot to add the flag or because we have changed our mind, we don't need delete the object to change the scope of it, let's see how.

    05/04/2023

    Read more...

More recent...

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