2 min read
After trying to set a custom default certificate for the OpenShift routes we might see how it's Pods starts crashing:
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
router-10-rh8vf 1/1 Running 0 32m
router-10-f2dt2 0/1 CrashLoopBackOff 6 7m
router-10-m45b7 1/1 Running 0 31m
Checking it's logs we'll get a quite misleading message:
$ kubectl logs router-10-f2dt2 -n default
Error from server: Get https://some.openshift.cluster:10250/containerLogs/default/router-10-f2dt2/router: x509: certificate has expired or is not yet valid
04/07/2023
Read more...2 min read
Sometimes we might have a secret stored in the AWS Secrets Manager with multiple properties but we don't really need all the data stored in the secret. We can tell External Secrets Operator to use just a specific key instead of using the whole secret.
13/06/2023
Read more...2 min read
When we print values using jsonpath we'll get all the values in a single line (actually, it won't even bother adding the newline character at the end of the list):
$ kubectl get ns -o jsonpath='{ .items[*].metadata.name }'
default dynamodb-operator ec2-operator iam-operator kube-node-lease kube-public kube-system local-path-storage testvault
06/06/2023
Read more...2 min read
One of the many improvements we get in Kubernetes 1.27 is the ability to set what's the default container:
apiVersion: v1
kind: Pod
metadata:
name: multi-container-pod
spec:
containers:
- image: alpine:latest
name: one
command:
- sh
- -c
- 'while true; do echo one; sleep 1m; done'
- image: alpine:latest
name: two
command:
- sh
- -c
- 'while true; do echo two; sleep 2m; done'
- image: alpine:latest
name: three
command:
- sh
- -c
- 'while true; do echo tree; sleep 3m; done'
01/06/2023
Read more...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...