Skip to content

Instantly share code, notes, and snippets.

@oke-py
Created September 9, 2020 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oke-py/177b2b3c7384d70856c18446bddbe4e9 to your computer and use it in GitHub Desktop.
Save oke-py/177b2b3c7384d70856c18446bddbe4e9 to your computer and use it in GitHub Desktop.
git diff upstream/release-1.17 fb6364d <file>
diff --git a/content/en/docs/setup/learning-environment/minikube.md b/content/en/docs/setup/learning-environment/minikube.md
index 439e4a10a..009be9adc 100644
--- a/content/en/docs/setup/learning-environment/minikube.md
+++ b/content/en/docs/setup/learning-environment/minikube.md
@@ -5,16 +5,16 @@ reviewers:
- aaron-prindle
title: Installing Kubernetes with Minikube
weight: 30
-content_template: templates/concept
+content_type: concept
---
-{{% capture overview %}}
+<!-- overview -->
Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
-{{% /capture %}}
-{{% capture body %}}
+
+<!-- body -->
## Minikube Features
@@ -37,116 +37,151 @@ See [Installing Minikube](/docs/tasks/tools/install-minikube/).
This brief demo guides you on how to start, use, and delete Minikube locally. Follow the steps given below to start and explore Minikube.
1. Start Minikube and create a cluster:
- ```shell
+
+ ```shell
minikube start
- ```
- The output is similar to this:
+ ```
- ```
- Starting local Kubernetes cluster...
- Running pre-create checks...
- Creating machine...
- Starting local Kubernetes cluster...
- ```
- For more information on starting your cluster on a specific Kubernetes version, VM, or container runtime, see [Starting a Cluster](#starting-a-cluster).
+ The output is similar to this:
+
+ ```
+ Starting local Kubernetes cluster...
+ Running pre-create checks...
+ Creating machine...
+ Starting local Kubernetes cluster...
+ ```
+
+ For more information on starting your cluster on a specific Kubernetes version, VM, or container runtime, see [Starting a Cluster](#starting-a-cluster).
2. Now, you can interact with your cluster using kubectl. For more information, see [Interacting with Your Cluster](#interacting-with-your-cluster).
- Let’s create a Kubernetes Deployment using an existing image named `echoserver`, which is a simple HTTP server and expose it on port 8080 using `--port`.
- ```shell
- kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10
- ```
- The output is similar to this:
- ```
- deployment.apps/hello-minikube created
- ```
+ Let’s create a Kubernetes Deployment using an existing image named `echoserver`, which is a simple HTTP server and expose it on port 8080 using `--port`.
+
+ ```shell
+ kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10
+ ```
+
+ The output is similar to this:
+
+ ```
+ deployment.apps/hello-minikube created
+ ```
3. To access the `hello-minikube` Deployment, expose it as a Service:
- ```shell
- kubectl expose deployment hello-minikube --type=NodePort --port=8080
- ```
- The option `--type=NodePort` specifies the type of the Service.
- The output is similar to this:
- ```
- service/hello-minikube exposed
- ```
+ ```shell
+ kubectl expose deployment hello-minikube --type=NodePort --port=8080
+ ```
+
+ The option `--type=NodePort` specifies the type of the Service.
+
+ The output is similar to this:
+
+ ```
+ service/hello-minikube exposed
+ ```
+
4. The `hello-minikube` Pod is now launched but you have to wait until the Pod is up before accessing it via the exposed Service.
- Check if the Pod is up and running:
- ```shell
- kubectl get pod
- ```
- If the output shows the `STATUS` as `ContainerCreating`, the Pod is still being created:
- ```
- NAME READY STATUS RESTARTS AGE
- hello-minikube-3383150820-vctvh 0/1 ContainerCreating 0 3s
- ```
- If the output shows the `STATUS` as `Running`, the Pod is now up and running:
- ```
- NAME READY STATUS RESTARTS AGE
- hello-minikube-3383150820-vctvh 1/1 Running 0 13s
- ```
+ Check if the Pod is up and running:
+
+ ```shell
+ kubectl get pod
+ ```
+
+ If the output shows the `STATUS` as `ContainerCreating`, the Pod is still being created:
+
+ ```
+ NAME READY STATUS RESTARTS AGE
+ hello-minikube-3383150820-vctvh 0/1 ContainerCreating 0 3s
+ ```
+
+ If the output shows the `STATUS` as `Running`, the Pod is now up and running:
+
+ ```
+ NAME READY STATUS RESTARTS AGE
+ hello-minikube-3383150820-vctvh 1/1 Running 0 13s
+ ```
+
5. Get the URL of the exposed Service to view the Service details:
- ```shell
- minikube service hello-minikube --url
- ```
+
+ ```shell
+ minikube service hello-minikube --url
+ ```
+
6. To view the details of your local cluster, copy and paste the URL you got as the output, on your browser.
- The output is similar to this:
- ```
- Hostname: hello-minikube-7c77b68cff-8wdzq
+ The output is similar to this:
- Pod Information:
- -no pod information available-
+ ```
+ Hostname: hello-minikube-7c77b68cff-8wdzq
- Server values:
- server_version=nginx: 1.13.3 - lua: 10008
+ Pod Information:
+ -no pod information available-
- Request Information:
- client_address=172.17.0.1
- method=GET
- real path=/
- query=
- request_version=1.1
- request_scheme=http
- request_uri=http://192.168.99.100:8080/
+ Server values:
+ server_version=nginx: 1.13.3 - lua: 10008
- Request Headers:
+ Request Information:
+ client_address=172.17.0.1
+ method=GET
+ real path=/
+ query=
+ request_version=1.1
+ request_scheme=http
+ request_uri=http://192.168.99.100:8080/
+
+ Request Headers:
accept=*/*
host=192.168.99.100:30674
user-agent=curl/7.47.0
- Request Body:
+ Request Body:
-no body in request-
- ```
- If you no longer want the Service and cluster to run, you can delete them.
+ ```
+
+ If you no longer want the Service and cluster to run, you can delete them.
+
7. Delete the `hello-minikube` Service:
- ```shell
- kubectl delete services hello-minikube
- ```
- The output is similar to this:
- ```
- service "hello-minikube" deleted
- ```
+
+ ```shell
+ kubectl delete services hello-minikube
+ ```
+
+ The output is similar to this:
+
+ ```
+ service "hello-minikube" deleted
+ ```
+
8. Delete the `hello-minikube` Deployment:
- ```shell
- kubectl delete deployment hello-minikube
- ```
- The output is similar to this:
- ```
- deployment.extensions "hello-minikube" deleted
- ```
+
+ ```shell
+ kubectl delete deployment hello-minikube
+ ```
+
+ The output is similar to this:
+
+ ```
+ deployment.extensions "hello-minikube" deleted
+ ```
+
9. Stop the local Minikube cluster:
- ```shell
- minikube stop
- ```
- The output is similar to this:
- ```
- Stopping "minikube"...
- "minikube" stopped.
- ```
- For more information, see [Stopping a Cluster](#stopping-a-cluster).
+
+ ```shell
+ minikube stop
+ ```
+
+ The output is similar to this:
+
+ ```
+ Stopping "minikube"...
+ "minikube" stopped.
+ ```
+
+ For more information, see [Stopping a Cluster](#stopping-a-cluster).
+
10. Delete the local Minikube cluster:
+
```shell
minikube delete
```
@@ -163,7 +198,7 @@ This brief demo guides you on how to start, use, and delete Minikube locally. Fo
The `minikube start` command can be used to start your cluster.
This command creates and configures a Virtual Machine that runs a single-node Kubernetes cluster.
-This command also configures your [kubectl](/docs/user-guide/kubectl-overview/) installation to communicate with this cluster.
+This command also configures your [kubectl](/docs/reference/kubectl/overview/) installation to communicate with this cluster.
{{< note >}}
If you are behind a web proxy, you need to pass this information to the `minikube start` command:
@@ -187,24 +222,27 @@ example, to run version {{< param "fullversion" >}}, you would run the following
minikube start --kubernetes-version {{< param "fullversion" >}}
```
#### Specifying the VM driver
-You can change the VM driver by adding the `--vm-driver=<enter_driver_name>` flag to `minikube start`.
+You can change the VM driver by adding the `--driver=<enter_driver_name>` flag to `minikube start`.
For example the command would be.
```shell
-minikube start --vm-driver=<driver_name>
+minikube start --driver=<driver_name>
```
- Minikube supports the following drivers:
- {{< note >}}
- See [DRIVERS](https://git.k8s.io/minikube/docs/drivers.md) for details on supported drivers and how to install
+Minikube supports the following drivers:
+{{< note >}}
+See [DRIVERS](https://minikube.sigs.k8s.io/docs/reference/drivers/) for details on supported drivers and how to install
plugins.
{{< /note >}}
-* virtualbox
+* docker ([driver installation](https://minikube.sigs.k8s.io/docs/drivers/docker/))
+* virtualbox ([driver installation](https://minikube.sigs.k8s.io/docs/drivers/virtualbox/))
+* podman ([driver installation](https://minikube.sigs.k8s.io/docs/drivers/podman/)) (EXPERIMENTAL)
* vmwarefusion
-* kvm2 ([driver installation](https://git.k8s.io/minikube/docs/drivers.md#kvm2-driver))
-* hyperkit ([driver installation](https://git.k8s.io/minikube/docs/drivers.md#hyperkit-driver))
-* hyperv ([driver installation](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperv-driver))
+* kvm2 ([driver installation](https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/))
+* hyperkit ([driver installation](https://minikube.sigs.k8s.io/docs/reference/drivers/hyperkit/))
+* hyperv ([driver installation](https://minikube.sigs.k8s.io/docs/reference/drivers/hyperv/))
Note that the IP below is dynamic and can change. It can be retrieved with `minikube ip`.
-* vmware ([driver installation](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver)) (VMware unified driver)
+* vmware ([driver installation](https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/)) (VMware unified driver)
+* parallels ([driver installation](https://minikube.sigs.k8s.io/docs/reference/drivers/parallels/))
* none (Runs the Kubernetes components on the host and not in a virtual machine. You need to be running Linux and to have {{< glossary_tooltip term_id="docker" >}} installed.)
{{< caution >}}
@@ -330,8 +368,13 @@ Starting the cluster again will restore it to its previous state.
The `minikube delete` command can be used to delete your cluster.
This command shuts down and deletes the Minikube Virtual Machine. No data or state is preserved.
-### Upgrading minikube
-See [upgrade minikube](https://minikube.sigs.k8s.io/docs/start/macos/)
+### Upgrading Minikube
+If you are using macOS and [Brew Package Manager](https://brew.sh/) is installed run:
+
+```shell
+brew update
+brew upgrade minikube
+```
## Interacting with Your Cluster
@@ -342,9 +385,11 @@ This context contains the configuration to communicate with your Minikube cluste
Minikube sets this context to default automatically, but if you need to switch back to it in the future, run:
-`kubectl config use-context minikube`,
+`kubectl config use-context minikube`
-Or pass the context on each command like this: `kubectl get pods --context=minikube`.
+Or pass the context on each command like this:
+
+`kubectl get pods --context=minikube`
### Dashboard
@@ -460,15 +505,15 @@ For more information about Minikube, see the [proposal](https://git.k8s.io/commu
## Additional Links
-* **Goals and Non-Goals**: For the goals and non-goals of the Minikube project, please see our [roadmap](https://git.k8s.io/minikube/docs/contributors/roadmap.md).
-* **Development Guide**: See [CONTRIBUTING.md](https://git.k8s.io/minikube/CONTRIBUTING.md) for an overview of how to send pull requests.
-* **Building Minikube**: For instructions on how to build/test Minikube from source, see the [build guide](https://git.k8s.io/minikube/docs/contributors/build_guide.md).
-* **Adding a New Dependency**: For instructions on how to add a new dependency to Minikube, see the [adding dependencies guide](https://git.k8s.io/minikube/docs/contributors/adding_a_dependency.md).
-* **Adding a New Addon**: For instructions on how to add a new addon for Minikube, see the [adding an addon guide](https://git.k8s.io/minikube/docs/contributors/adding_an_addon.md).
+* **Goals and Non-Goals**: For the goals and non-goals of the Minikube project, please see our [roadmap](https://minikube.sigs.k8s.io/docs/contrib/roadmap/).
+* **Development Guide**: See [Contributing](https://minikube.sigs.k8s.io/docs/contrib/) for an overview of how to send pull requests.
+* **Building Minikube**: For instructions on how to build/test Minikube from source, see the [build guide](https://minikube.sigs.k8s.io/docs/contrib/building/).
+* **Adding a New Dependency**: For instructions on how to add a new dependency to Minikube, see the [adding dependencies guide](https://minikube.sigs.k8s.io/docs/contrib/drivers/).
+* **Adding a New Addon**: For instructions on how to add a new addon for Minikube, see the [adding an addon guide](https://minikube.sigs.k8s.io/docs/contrib/addons/).
* **MicroK8s**: Linux users wishing to avoid running a virtual machine may consider [MicroK8s](https://microk8s.io/) as an alternative.
## Community
-Contributions, questions, and comments are all welcomed and encouraged! Minikube developers hang out on [Slack](https://kubernetes.slack.com) in the #minikube channel (get an invitation [here](http://slack.kubernetes.io/)). We also have the [kubernetes-dev Google Groups mailing list](https://groups.google.com/forum/#!forum/kubernetes-dev). If you are posting to the list please prefix your subject with "minikube: ".
+Contributions, questions, and comments are all welcomed and encouraged! Minikube developers hang out on [Slack](https://kubernetes.slack.com) in the `#minikube` channel (get an invitation [here](https://slack.kubernetes.io/)). We also have the [kubernetes-dev Google Groups mailing list](https://groups.google.com/forum/#!forum/kubernetes-dev). If you are posting to the list please prefix your subject with "minikube: ".
+
-{{% /capture %}}
@hikkie3110
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment