Let’s assume we have following JSON document Now, we want to access the value where the key is “b”. In this specific case, we can of course do so with But this relies on the order in the array and the data itself. A more generic and stable way would be For more details on […]
Monthly Archives: April 2019
How to access the name of a pod?
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 […]