2 min read
To be able to debug issues we can test a TCP connection using netcat (nc) or even telnet. But when we are on a containerized environment such as Kubernetes it can be a challenge when the container doesn't have the right tools for the job
$ nc
bash: nc: command not found
$ netcat
bash: netcat: command not found
$ telnet
bash: telnet: command not found
05/07/2021
Read more...2 min read
It's common practice to use a map in terraform to configure resources. If we want to use a map with optional values we can make use of the try() function
Let's us the following map as an example:
config = {
namespaces = ["namespace1", "namespace2"]
(...)
}
02/07/2021
Read more...3 min read
On Kubernetes, scaling an application is just a matter of defining how many replicas we want:
$ kubectl scale deployment/demo --replicas=5
deployment.apps/demo scaled
Having to manually adjust the number of replicas is not really practical. Here's where the HorizontalPodAutoscaler (HPA) comes into play
01/07/2021
Read more...2 min read
If we need to be able to share some data across containers (one generates the data and the other one consumes it) we can use an emptyDir to create a Volume to mount on both containers.
30/06/2021
Read more...2 min read
The configuration file kubeconfig (~/.kube/config) is used to get access to a Kubernetes cluster. It looks like a Kubernetes object that defines the cluster, the user and the context to use:
apiVersion: v1
kind: Config
preferences: {}
clusters:
(...)
users:
(...)
contexts:
(...)
Let's take a minikube kubeconfig as an example
29/06/2021
Read more...