Victor Pacheco:
Hi Guys. Can i get some guidance on this one?
I’m looking at the k8s kubectl Cheat Sheet. And looking at formatting output but still stuck. BTW. I’m familiar with JSON path. I assume this is something similar.
I’m looking at this section:
# All images running in namespace: default, grouped by Pod
kubectl get pods --namespace default --output=custom-columns="NAME:.metadata.name,IMAGE:.spec.containers[*].image"
In this case it is not pods but deployments. If you give me the correct syntax i can figure out how the path is defined. I’m looking at the yaml file for “deployments” in this namespace and trying to define from there.
Lightning Lab 1 Q 2.
"Print the names of all deployments in the admin2406 namespace in the following format:
DEPLOYMENT CONTAINER_IMAGE READY_REPLICAS NAMESPACE
<deployment name> <container image used> <ready replica count> <Namespace>.
The data should be sorted by the increasing order of the deployment name.
Example:
DEPLOYMENT CONTAINER_IMAGE READY_REPLICAS NAMESPACE
deploy0 nginx:alpine 1 admin2406
Write the result to the file /opt/admin2406_data."