• Show current Kubernetes context in the menu bar

    2 min read

    kubernetes context macos tray icon

    Some commands might be safe to execute while connected to some environments, but can definitely break stuff is applied to the wrong Kubernetes cluster. However, having to execute kubectl config current-context too ofter to make sure we are connected to the right cluster is no fun either.

    With kubectx tray we can have a small icon on the tray bar to help us identify what's the current cluster.

    30/11/2022

    Read more...
  • Kubernetes - Check with RBAC: Can I...?

    2 min read

    kubernetes kubectl rbac auth check permissions

    When configuring RBAC permissions we might want to make sure we are configuring them correctly by checking what an user (or ServiceAccount) can do. We can use kubectl auth can-i for this.

    29/11/2022

    Read more...
  • kubectl: Get the name of the current context

    1 min read

    kubernetes kubectl context

    Since we can have several clusters configured we need to know to which cluster we are issues commands to, there are several ways we can do it with kubectl config:

    03/11/2022

    Read more...
  • Patching a kubernetes object with kubectl patch and a patch file

    2 min read

    kubernetes kubectl patch file

    We can use the kubectl patch command with the -p option to update an existing kubernetes object:

    $ kubectl patch sc gp2 -p '{"allowVolumeExpansion": true}'
    storageclass.storage.k8s.io/gp2 patched
    

    When the patch is small is a very convenient way of patching it but as the patch grows it becomes less convenient

    19/09/2022

    Read more...
  • Kubernetes: Apply parts of a manifest by labels

    2 min read

    kubernetes kubectl selector apply

    Sometimes we might have a manifest file with a lot of objects in it but we don't really need them all. We can use it's labels to install just the objects that have a specific label.

    15/09/2022

    Read more...

More recent...

Older content...

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