Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ps: show Kubernetes names (k8s://NS/POD[/CONTAINER]) #485

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

AkihiroSuda
Copy link
Member

root@minikube:/# nerdctl -n k8s.io ps -a
CONTAINER ID    IMAGE                                                                                                PLATFORM    COMMAND                   CREATED           STATUS    PORTS    NAMES
0c82e6a41832    k8s.gcr.io/kube-scheduler@sha256:c76cb73debd5e37fe7ad42cea9a67e0bfdd51dd56be7b90bdc50dd1bc03c018b                "kube-scheduler --au…"    11 minutes ago    Up                 k8s://kube-system/kube-scheduler-minikube/kube-scheduler
0f73721b5ae9    k8s.gcr.io/kube-proxy:v1.22.2                                                                                    "/usr/local/bin/kube…"    11 minutes ago    Up                 k8s://kube-system/kube-proxy-c79qg/kube-proxy
28506f919cfe    k8s.gcr.io/coredns/coredns:v1.8.4                                                                                "/coredns -conf /etc…"    10 minutes ago    Up                 k8s://kube-system/coredns-78fcd69978-4fkkt/coredns
2979a9be3346    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  10 minutes ago    Up                 k8s://kube-system/coredns-78fcd69978-4fkkt
365da6dc8fba    docker.io/kindest/kindnetd:v20210326-1e038dc5                                                                    "/bin/kindnetd"           11 minutes ago    Up                 k8s://kube-system/kindnet-bfwt4/kindnet-cni
3c765a99540b    k8s.gcr.io/etcd:3.5.0-0                                                                                          "etcd --advertise-cl…"    11 minutes ago    Up                 k8s://kube-system/etcd-minikube/etcd
3e684e419901    k8s.gcr.io/kube-controller-manager:v1.22.2                                                                       "kube-controller-man…"    11 minutes ago    Up                 k8s://kube-system/kube-controller-manager-minikube/kube-controller-manager
4d8f064d73d9    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/etcd-minikube
5f92a2feee9c    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kindnet-bfwt4
6892b49efcce    gcr.io/k8s-minikube/storage-provisioner:v5                                                                       "/storage-provisioner"    10 minutes ago    Up                 k8s://kube-system/storage-provisioner/storage-provisioner
7df2c1178013    k8s.gcr.io/kube-apiserver:v1.22.2                                                                                "kube-apiserver --ad…"    11 minutes ago    Up                 k8s://kube-system/kube-apiserver-minikube/kube-apiserver
91832deed72f    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-apiserver-minikube
b7d57134a18f    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-scheduler-minikube
ccfe73b0da5c    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-proxy-c79qg
d32cec71e3e0    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  10 minutes ago    Up                 k8s://kube-system/storage-provisioner
f6fda23c32c2    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-controller-manager-minikube

No support for specifying nerdctl container inspect k8s://NS/POD[/CONTAINER] and other similar commands

root@minikube:/# nerdctl container inspect k8s://kube-system/coredns-78fcd69978-4fkkt/coredns
FATA[0000] 1 errors: [specifying "k8s://..." form is not supported (Hint: specify ID instead): "k8s://kube-system/coredns-78fcd69978-4fkkt/coredns"]

```console
root@minikube:/# nerdctl -n k8s.io ps -a
CONTAINER ID    IMAGE                                                                                                PLATFORM    COMMAND                   CREATED           STATUS    PORTS    NAMES
0c82e6a41832    k8s.gcr.io/kube-scheduler@sha256:c76cb73debd5e37fe7ad42cea9a67e0bfdd51dd56be7b90bdc50dd1bc03c018b                "kube-scheduler --au…"    11 minutes ago    Up                 k8s://kube-system/kube-scheduler-minikube/kube-scheduler
0f73721b5ae9    k8s.gcr.io/kube-proxy:v1.22.2                                                                                    "/usr/local/bin/kube…"    11 minutes ago    Up                 k8s://kube-system/kube-proxy-c79qg/kube-proxy
28506f919cfe    k8s.gcr.io/coredns/coredns:v1.8.4                                                                                "/coredns -conf /etc…"    10 minutes ago    Up                 k8s://kube-system/coredns-78fcd69978-4fkkt/coredns
2979a9be3346    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  10 minutes ago    Up                 k8s://kube-system/coredns-78fcd69978-4fkkt
365da6dc8fba    docker.io/kindest/kindnetd:v20210326-1e038dc5                                                                    "/bin/kindnetd"           11 minutes ago    Up                 k8s://kube-system/kindnet-bfwt4/kindnet-cni
3c765a99540b    k8s.gcr.io/etcd:3.5.0-0                                                                                          "etcd --advertise-cl…"    11 minutes ago    Up                 k8s://kube-system/etcd-minikube/etcd
3e684e419901    k8s.gcr.io/kube-controller-manager:v1.22.2                                                                       "kube-controller-man…"    11 minutes ago    Up                 k8s://kube-system/kube-controller-manager-minikube/kube-controller-manager
4d8f064d73d9    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/etcd-minikube
5f92a2feee9c    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kindnet-bfwt4
6892b49efcce    gcr.io/k8s-minikube/storage-provisioner:v5                                                                       "/storage-provisioner"    10 minutes ago    Up                 k8s://kube-system/storage-provisioner/storage-provisioner
7df2c1178013    k8s.gcr.io/kube-apiserver:v1.22.2                                                                                "kube-apiserver --ad…"    11 minutes ago    Up                 k8s://kube-system/kube-apiserver-minikube/kube-apiserver
91832deed72f    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-apiserver-minikube
b7d57134a18f    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-scheduler-minikube
ccfe73b0da5c    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-proxy-c79qg
d32cec71e3e0    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  10 minutes ago    Up                 k8s://kube-system/storage-provisioner
f6fda23c32c2    k8s.gcr.io/pause:3.5                                                                                             "/pause"                  11 minutes ago    Up                 k8s://kube-system/kube-controller-manager-minikube
```

No support for specifying `nerdctl container inspect k8s://NS/POD[/CONTAINER]` and other similar commands
```console
root@minikube:/# nerdctl container inspect k8s://kube-system/coredns-78fcd69978-4fkkt/coredns
FATA[0000] 1 errors: [specifying "k8s://..." form is not supported (Hint: specify ID instead): "k8s://kube-system/coredns-78fcd69978-4fkkt/coredns"]
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda added this to the v0.13.0 milestone Nov 1, 2021
@fahedouch
Copy link
Member

LGTM

@AkihiroSuda AkihiroSuda merged commit 570b735 into containerd:master Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants