argo-cd icon indicating copy to clipboard operation
argo-cd copied to clipboard

Add pod_ip address access via argocd-cli

Open Boniker opened this issue 7 months ago • 7 comments

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 resources shows pods but not their IPs
  • REST API /api/v1/applications/{name}/resource-tree doesn'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

Boniker avatar May 12 '25 21:05 Boniker

I'll bring this up next meeting. Thanks!

nitishfy avatar May 13 '25 04:05 nitishfy

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.

agaudreault avatar May 15 '25 15:05 agaudreault

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.

Boniker avatar May 21 '25 08:05 Boniker

Curious to know how should this wrapper look like to the CLI. Should we try adding a new flag or what?

nitishfy avatar May 21 '25 11:05 nitishfy

It should be a new command. You can design a command proposal and post it here

agaudreault avatar May 22 '25 15:05 agaudreault

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]

Boniker avatar May 28 '25 22:05 Boniker

FYI https://github.com/argoproj/argo-cd/issues/23196

nitishfy avatar May 29 '25 06:05 nitishfy