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/tutorials/hello-minikube.md
+34-32Lines changed: 34 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,14 +17,8 @@ card:
17
17
18
18
<!-- overview -->
19
19
20
-
This tutorial shows you how to run a sample app
21
-
on Kubernetes using minikube and Katacoda.
22
-
Katacoda provides a free, in-browser Kubernetes environment.
23
-
24
-
{{< note >}}
25
-
You can also follow this tutorial if you've installed minikube locally.
26
-
See [minikube start](https://minikube.sigs.k8s.io/docs/start/) for installation instructions.
27
-
{{< /note >}}
20
+
This tutorial shows you how to run a sample app on Kubernetes using minikube.
21
+
The tutorial provides a container image that uses NGINX to echo back all the requests.
28
22
29
23
## {{% heading "objectives" %}}
30
24
@@ -35,31 +29,34 @@ See [minikube start](https://minikube.sigs.k8s.io/docs/start/) for installation
35
29
## {{% heading "prerequisites" %}}
36
30
37
31
38
-
This tutorial provides a container image that uses NGINX to echo back all the requests.
32
+
This tutorial assumes that you have already set up `minikube`.
33
+
See [minikube start](https://minikube.sigs.k8s.io/docs/start/) for installation instructions.
39
34
35
+
You also need to install `kubectl`.
36
+
See [Install tools](/docs/tasks/tools/#kubectl) for installation instructions.
40
37
41
38
42
39
<!-- lessoncontent -->
43
40
44
41
## Create a minikube cluster
45
42
46
-
1. Click **Launch Terminal**.
47
-
48
-
{{< kat-button >}}
49
-
50
-
{{< note >}}
51
-
If you installed minikube locally, run `minikube start`. Before you run `minikube dashboard`, you should open a new terminal, start `minikube dashboard` there, and then switch back to the main terminal.
52
-
{{< /note >}}
43
+
```shell
44
+
minikube start
45
+
```
53
46
54
-
2. Open the Kubernetes dashboard in a browser:
47
+
##Open the Dashboard
55
48
56
-
```shell
57
-
minikube dashboard
58
-
```
49
+
Open the Kubernetes dashboard. You can do this two different ways:
59
50
60
-
3. Katacoda environment only: At the top of the terminal pane, click the plus sign, and then click **Select port to view on Host 1**.
51
+
{{< tabs name="dashboard" >}}
52
+
{{% tab name="Launch a browser" %}}
53
+
Open a **new** terminal, and run:
54
+
```shell
55
+
# Start a new terminal, and leave this running.
56
+
minikube dashboard
57
+
```
61
58
62
-
4. Katacoda environment only: Type `30000`, and then click **Display Port**.
59
+
Now, switch back to the terminal where you ran `minikube start`.
63
60
64
61
{{< note >}}
65
62
The `dashboard` command enables the dashboard add-on and opens the proxy in the default web browser.
@@ -75,14 +72,24 @@ After the command exits, the dashboard remains running in the Kubernetes cluster
75
72
You can run the `dashboard` command again to create another proxy to access the dashboard.
76
73
{{< /note >}}
77
74
78
-
## Open Dashboard with URL
75
+
{{% /tab %}}
76
+
{{% tab name="URL copy and paste" %}}
79
77
80
-
If you don't want to open a web browser, run the dashboard command with the `--url` flag to emit a URL:
78
+
If you don't want minikube to open a web browser fr you, run the dashboard command with the
79
+
`--url` flag. `minikube` outputs a URL that you can open in the browser you prefer:
81
80
81
+
```
82
+
Open a **new** terminal, and run:
82
83
```shell
84
+
# Start a new terminal, and leave this running.
83
85
minikube dashboard --url
84
86
```
85
87
88
+
Now, switch back to the terminal where you ran `minikube start`.
89
+
90
+
{{% /tab %}}
91
+
{{< /tabs >}}
92
+
86
93
## Create a Deployment
87
94
88
95
A Kubernetes [*Pod*](/docs/concepts/workloads/pods/) is a group of one or more Containers,
@@ -92,8 +99,6 @@ tutorial has only one Container. A Kubernetes
92
99
Pod and restarts the Pod's Container if it terminates. Deployments are the
93
100
recommended way to manage the creation and scaling of Pods.
94
101
95
-
1. Katacoda environment only: At the top of the terminal pane, click the plus sign, and then click **Open New Terminal**.
96
-
97
102
1. Use the `kubectl create` command to create a Deployment that manages a Pod. The
98
103
Pod runs a Container based on the provided Docker image.
4. Katacoda environment only: Click the plus sign, and then click **Select port to view on Host 1**.
191
-
192
-
5. Katacoda environment only: Note the 5-digit port number displayed opposite to `8080`in services output. This port number is randomly generated and it can be different foryou. Type your numberin the port number text box, then click Display Port. Using the example from earlier, you would type`30369`.
193
-
194
195
This opens up a browser window that serves your app and shows the app's response.
195
196
196
197
## Enable addons
@@ -287,7 +288,7 @@ kubectl delete service hello-node
287
288
kubectl delete deployment hello-node
288
289
```
289
290
290
-
Optionally, stop the Minikube virtual machine (VM):
291
+
Stop the minikube cluster:
291
292
292
293
```shell
293
294
minikube stop
@@ -296,10 +297,11 @@ minikube stop
296
297
Optionally, delete the Minikube VM:
297
298
298
299
```shell
300
+
# Optional
299
301
minikube delete
300
302
```
301
303
302
-
304
+
If you want to use minikube again to learn more about Kubernetes, you don't need to delete it.
0 commit comments