Question
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.kubectl -n admin2406 get deploy -o json
kubectl -n admin2406 get deploy -o='custom-columns=DEPLOYMENT:.metadata.name,CONTAINER_IMAGE:.spec.template.spec.containers[].name,READY_REPLICAS:.status.readyReplicas,NAMESPACE:.metadata.namespace'
kubectl -n admin2406 get deploy -o='custom-columns=DEPLOYMENT:.metadata.name,CONTAINER_IMAGE:.spec.template.spec.containers[].name,READY_REPLICAS:.status.readyReplicas,NAMESPACE:.metadata.namespace' --sort-by=.metadata.name
kubectl -n admin2406 get deploy -o='custom-columns=DEPLOYMENT:.metadata.name,CONTAINER_IMAGE:.spec.template.spec.containers[].name,READY_REPLICAS:.status.readyReplicas,NAMESPACE:.metadata.namespace' --sort-by=.metadata.name > /opt/admin2406_data