2 min read
In today's highly dynamic and containerized environments, managing environment variables is crucial for configuring applications effectively. With the Kubernetes command-line tool, kubectl, you can imperatively set or remove environment variables for your existing objects.
21/05/2023
Read more...2 min read
To locally run some process we might need to use some ServiceAccount credentials to make sure it has the same exact permissions it would have running it as a Pod. To do se we can import the ServiceAccount token into our kubeconfig to be able to impersonate it.
29/05/2023
Read more...2 min read
If when writing Pulumi code to deploy to AWS ever got the feeling that you where using some interface to write terraform code (HCL), there might be a reason for you to get that feeling.
24/05/2023
Read more...4 min read
To be able to automatically request letsencrypt certificates for the TLS-eanble Ingress objects in a kubernetes cluster with the traefik ingress controller we can use the cert-manager controller.
23/05/2023
Read more...3 min read
If we want to take a look at the network traffic that we get out of an OpenShift node we can use the oc debug command to spin up a privileged pod with tcpdump installed. This way we don't need to ssh into the worker node.
22/05/2023
Read more...4 min read
Kubernetes is a powerful container orchestration platform used by many organizations to deploy and manage their applications. Interacting with a Kubernetes cluster requires configuring the kubeconfig file with the necessary credentials. However, managing these credentials can be challenging, especially in scenarios where a bastion host or SSH tunnel is required.
With kubectl-tokensshtunnel we can automate the process of creating an SSH tunnel to a remote server and retrieving the Kubernetes credentials from there. This tool simplifies access to remote Kubernetes clusters by securely caching the credentials for a specified duration.
18/05/2023
Read more...2 min read
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...2 min read
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...4 min read
Just in the same way we backup physical servers, we need to backup Kubernetes workloads to be able to restore it to its previous state: We'll need make sure we are going to be able to restore the objects of any namespace and it's data (PersistentVolumes)
08/05/2023
Read more...2 min read
While writing Kustomize patches you might come across is the need to escape certain characters, such as the forward slash (/
). This can be a bit tricky since the common conventions on how to escape a character don't apply here.
03/05/2023
Read more...