devops:docker:kubernetes:tutorial-win-minikube
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
devops:docker:kubernetes:tutorial-win-minikube [2024/06/19 19:42] – created skipidar | devops:docker:kubernetes:tutorial-win-minikube [2024/07/24 20:22] (current) – skipidar | ||
---|---|---|---|
Line 6: | Line 6: | ||
== Install Minikube on Windows == | == Install Minikube on Windows == | ||
https:// | https:// | ||
+ | |||
+ | |||
+ | |||
+ | == After restart - make sure its running == | ||
+ | Make sure docker desktop is running after restart | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | == Use minikube == | ||
+ | |||
+ | <sxh> | ||
+ | minikube start | ||
+ | </ | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <sxh> | ||
+ | kubectl get po -A | ||
+ | </ | ||
+ | |||
+ | == Prefix " | ||
+ | |||
+ | To avoid " | ||
+ | |||
+ | it is important to use | ||
+ | |||
+ | <sxh> | ||
+ | minikube kubectl -- <YOU KUBECTL PARAMS> | ||
+ | minikube kubectl -- version | ||
+ | minikube kubectl -- create deployment demo-consume-api --image=ghcr.io/ | ||
+ | </ | ||
+ | |||
+ | == " | ||
+ | |||
+ | Use the alias on Linux | ||
+ | <sxh> | ||
+ | alias kubectl=" | ||
+ | </ | ||
+ | |||
+ | Use the functions on Windows powershell | ||
+ | <sxh> | ||
+ | function kubectl { | ||
+ | param( | ||
+ | [Parameter(Mandatory = $false)] | ||
+ | [string] $arguments | ||
+ | ) | ||
+ | minikube kubectl -- $arguments | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <sxh> | ||
+ | minikube kubectl -- get po -A | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == Dashboard == | ||
+ | <sxh> | ||
+ | minikube dashboard | ||
+ | </ | ||
+ | |||
+ | {{https:// | ||
+ | {{https:// | ||
+ | |||
+ | |||
+ | |||
+ | == On Minikube - open a port to listen on your Windows machine == | ||
+ | |||
+ | Assume you earlier created some **deployment** | ||
+ | |||
+ | <sxh shell> | ||
+ | minikube kubectl -- create deployment demo-consume-api --image=ghcr.io/ | ||
+ | </ | ||
+ | |||
+ | This application is running on port '' | ||
+ | |||
+ | Then to expose the deployment | ||
+ | |||
+ | <sxh shell> | ||
+ | minikube service list | ||
+ | |----------------------|---------------------------|--------------|-----| | ||
+ | | NAMESPACE | ||
+ | |----------------------|---------------------------|--------------|-----| | ||
+ | | default | ||
+ | | default | ||
+ | | kube-system | ||
+ | | kubernetes-dashboard | dashboard-metrics-scraper | No node port | | | ||
+ | | kubernetes-dashboard | kubernetes-dashboard | ||
+ | |----------------------|---------------------------|--------------|-----| | ||
+ | |||
+ | |||
+ | # pick the service deployment | ||
+ | # its on port 8080 | ||
+ | # now make a port exposed | ||
+ | |||
+ | minikube service --url demo-consume-api | ||
+ | http:// | ||
+ | ❗ Because you are using a Docker driver on windows, the terminal needs to be open to run it. | ||
+ | |||
+ | # other terminal you now can | ||
+ | curl http:// | ||
+ | |||
+ | </ | ||
devops/docker/kubernetes/tutorial-win-minikube.1718826166.txt.gz · Last modified: by skipidar