Skip to content

Commit

Permalink
[en] Fix label selector in "kubectl for Docker Users"
Browse files Browse the repository at this point in the history
Before
```sh
kubectl get po -l
run=nginx-app
No resources found in default namespace.
```
Because:
```sh
kubectl get po --show-labels
NAME                         READY   STATUS    RESTARTS   AGE   LABELS
nginx-app-58cfd4c468-jx6qp   1/1     Running   0          17m app=nginx-app,pod-template-hash=58cfd4c468
```
After:
```sh
kubectl get po -l app=nginx-app
NAME                         READY   STATUS    RESTARTS   AGE
nginx-app-58cfd4c468-jx6qp   1/1     Running   0          18m
```
  • Loading branch information
joostas committed Apr 17, 2021
1 parent 3ee03e4 commit 74d6495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/en/docs/reference/kubectl/docker-cli-to-kubectl.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ nginx-app 1/1 1 1 2m
```

```shell
kubectl get po -l run=nginx-app
kubectl get po -l app=nginx-app
```
```
NAME READY STATUS RESTARTS AGE
Expand All @@ -279,7 +279,7 @@ deployment "nginx-app" deleted
```

```shell
kubectl get po -l run=nginx-app
kubectl get po -l app=nginx-app
# Return nothing
```

Expand Down

0 comments on commit 74d6495

Please sign in to comment.