Request Kube API with curl within a pod

Today we will see how to request Kubernetes API from within a pod in the cluster. I assume you already have a kubernetes cluster deployed somewhere. On my side, I will spin a sandbox cluster on my PC with k3d. nginx deployment For the purpose of this blog post, I will create a nginx deployment in my sandbox cluster: kubectl create deploy --image=nginx nginx create a dedicated serviceAccount and RBAC Most of the time, you will get a 403 Forbidden response if you try to request the KubeAPI from within the cluster....

<span title='2022-10-31 00:00:01 +0000 UTC'>October 31, 2022</span>&nbsp;·&nbsp;6 min&nbsp;·&nbsp;JC

Filter Kubernetes objects by annotation with kubectl

The problem kubectl has a decent mechanism for querying kubernetes objects by label but sometimes you will need to get pods, services, or anything else by querying their annotation. Some dudes asked for annotation query support here but it is not planned at the moment: You cannot query annotations in Kubernetes, and this will not change in the foreseeable future. To achieve that, you will find on the internet a way to achieve that with jsonpath....

<span title='2022-10-19 00:00:01 +0000 UTC'>October 19, 2022</span>&nbsp;·&nbsp;4 min&nbsp;·&nbsp;JC