Skip to content

Introduce argocd app get-resource command to display pod information #23196

@nitishfy

Description

@nitishfy

Summary

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. The API call to You can call https://cd.apps.argoproj.io/swagger-ui#tag/ApplicationService/operation/ApplicationService_GetResource solves this problem. However, it would be a great addition to add this functionality wrapped into the CLI as well.

Motivation

#22945

Proposal

Command Syntax

argocd app pods <APPNAME> [flags]

Example Usage

argocd app pods guestbook
argocd app pods guestbook -n dev
argocd app pods guestbook --output json
argocd app pods guestbook --watch

Flags

Flag | Type | Description
|       |    
-n, --namespace | string | Filter pods by a specific namespace. Defaults to the namespace(s) defined in the app spec.
-l, --selector | string | Label selector to filter pods.
-o, --output | string | Output format: wide, json, yaml (default: wide)

Output Format

Similar to kubectl get pods, but scoped to the application's live state

Wide Output (default)

NAME                       READY   STATUS    RESTARTS   AGE   NAMESPACE IP
guestbook-76f5b67c6f-l7ql7 1/1     Running   0          2d    dev      192.112....
redis-master-0            1/1     Running   0          2d    dev.      192.112...

When using the --output json|yaml, return raw pod data as serialized JSON/YAML.

Metadata

Metadata

Assignees

Labels

component:cliIssue related to the Argo CD CLIenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions