Sometimes you need the name of a pod within a script (e.g. with kubectl exec). But since you normally want to use a deployment or replica set to manage your pod, the name of the pod might change and cannot be predicted. There is an easy way to access the name of the pod via […]
Here is a simple example of how to create a kubernetes deployment out of a yaml file. The file can then be applied with kubectl apply -f client.yaml. To verify the pod being started, just run kubectl get pod -l app=client.
With kubectl, you can just forward a specific port of some pod to your local machine. So you can test the pod. A simple example: