You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/reference/kubectl/docker-cli-to-kubectl.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ You can use the Kubernetes command line tool kubectl to interact with the API Se
13
13
{{% capture body %}}
14
14
## docker run
15
15
16
-
To run an nginx Deployment and expose the Deployment, see [kubectl run](/docs/reference/generated/kubectl/kubectl-commands/#run).
16
+
To run an nginx Pod and expose the Pod, see [kubectl run](/docs/reference/generated/kubectl/kubectl-commands/#run).
17
17
18
18
docker:
19
19
@@ -39,22 +39,22 @@ kubectl:
39
39
kubectl run --image=nginx nginx-app --port=80 --env="DOMAIN=cluster"
40
40
```
41
41
```
42
-
deployment "nginx-app" created
42
+
pod/nginx-app created
43
43
```
44
44
45
45
{{< note >}}
46
-
`kubectl` commands print the type and name of the resource created or mutated, which can then be used in subsequent commands. You can expose a new Service after a Deployment is created.
46
+
`kubectl` commands print the type and name of the resource created or mutated, which can then be used in subsequent commands. You can expose a new Service after a Pod is created.
kubectl expose pod nginx-app --port=80 --name=nginx-http
52
52
```
53
53
```
54
54
service "nginx-http" exposed
55
55
```
56
56
57
-
By using kubectl, you can create a [Deployment](/docs/concepts/workloads/controllers/deployment/) to ensure that N pods are running nginx, where N is the number of replicas stated in the spec and defaults to 1. You can also create a [service](/docs/concepts/services-networking/service/) with a selector that matches the pod labels. For more information, see [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster).
57
+
By using kubectl, you can create a [Pod](/docs/concepts/workloads/pods/pod/) to ensure that pod are running nginx. You can also create a [service](/docs/concepts/services-networking/service/) with a selector that matches the pod labels. For more information, see [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster).
58
58
59
59
By default images run in the background, similar to `docker run -d ...`. To run things in the foreground, use:
Unlike `docker run ...`, if you specify `--attach`, then you attach `stdin`, `stdout` and `stderr`. You cannot control which streams are attached (`docker -a ...`).
66
66
To detach from the container, you can type the escape sequence Ctrl+P followed by Ctrl+Q.
67
67
68
-
Because the kubectl run command starts a Deployment for the container, the Deployment restarts if you terminate the attached process by using Ctrl+C, unlike `docker run -it`.
69
-
To destroy the Deployment and its pods you need to run `kubectl delete deployment <name>`.
68
+
Because the kubectl run command starts a Pod for the container, the Pod restarts if you terminate the attached process by using Ctrl+C, unlike `docker run -it`.
69
+
To destroy the pod you need to run `kubectl delete pod <name>`.
0 commit comments