Add pod_ip address access via argocd-cli
Description
Right now, there’s no easy way to see the IP addresses of pods using the ArgoCD CLI. This information is valuable for monitoring, and various operational tasks without requiring direct kubectl access to the cluster.
Current Workarounds
argocd app resourcesshows pods but not their IPs- REST API
/api/v1/applications/{name}/resource-treedoesn't include pod IP information - Without direct kubectl access, this information becomes inaccessible
Possible Options
Add pod IP address access via ArgoCD CLI, like --show-pod-ips flag added to argocd app resources, or argocd app pods
Advantages
- Improved troubleshooting and operational capabilities
- Reduced need for direct kubectl access in environments where access is restricted
I'll bring this up next meeting. Thanks!
You can call https://cd.apps.argoproj.io/swagger-ui#tag/ApplicationService/operation/ApplicationService_GetResource
A good feature would be to add that to the CLI as a wrapper.
That's perfect — the API call to https://cd.apps.argoproj.io/swagger-ui#tag/ApplicationService/operation/ApplicationService_GetResource works exactly as needed and provides the required data.
At the same time, it would be a great addition to have this functionality wrapped into the CLI as well.
Curious to know how should this wrapper look like to the CLI. Should we try adding a new flag or what?
It should be a new command. You can design a command proposal and post it here
If possible, we can look at two possible approaches:
Option 1: Enhance argocd app resources (--show-pod-ips)
argocd app resources <APP_NAME> --show-pod-ips
This would include Pod resources in the output along with their IP addresses
Option 2: New dedicated command argocd app pods
argocd app pods <APP_NAME> [--output json|yaml|table]
FYI https://github.com/argoproj/argo-cd/issues/23196