rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.01k stars 283 forks source link

Create `rdctl info` command to provide non-settings state, like IP address #5526

Open jandubois opened 1 year ago

jandubois commented 1 year ago

Current use case is to query the IP address of the VM (see https://github.com/rancher-sandbox/rancher-desktop/issues/2609#issuecomment-1718556068). We currently have to write

export RD_IP=$(rdctl shell ip a show vznat | awk '/inet / {sub("/.*",""); print $2}')

This should be simpler, like

export RD_IP=$(rdctl info --ipaddr)

Other interesting values are free/used memory, disk space. Version information for important components, like container engines.

All available information should be shown in human-friendly format with rdctl info and in JSON format via rdctl info --json.

See also docker info, nerdctl info, kubectl cluster-info for inspiration.

jsoref commented 9 months ago

I'd like to get the Rancher Desktop version too...