devops:docker:kubernetes:tutorial-win-minikube
This is an old revision of the document!
−Table of Contents
Windows Minikube
Install docker on windows
Install Minikube on Windows
After restart - make sure its running
Use minikube
Prefix "minikube kubectl"
To avoid “Unauthorized exception” when using “kubectl”
it is important to use
1 2 3 |
minikube kubectl -- <YOU KUBECTL PARAMS> minikube kubectl -- version minikube kubectl -- create deployment demo-consume-api --image=ghcr.io/alfrepo/demo-consume-api:latest |
"alias" for kubectl
Use the alias on Linux
1 |
alias kubectl="minikube kubectl --" |
Use the functions on Windows powershell
1 2 3 4 5 6 7 |
function kubectl { param( [Parameter(Mandatory = $false)] [string] $arguments ) minikube kubectl -- $arguments } |
1 |
minikube kubectl -- get po -A |
Dashboard
On Minikube - open a port to listen on your Windows machine
Assume you earlier created some deployment
1 |
minikube kubectl -- create deployment demo-consume-api --image=ghcr.io /alfrepo/demo-consume-api :latest |
This application is running on port '8080
', exposing API on '/public/hello'
Then to expose the deployment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
minikube service list |----------------------|---------------------------|--------------|-----| | NAMESPACE | NAME | TARGET PORT | URL | |----------------------|---------------------------|--------------|-----| | default | demo-consume-api | 8080 | | | default | kubernetes | No node port | | | kube-system | kube-dns | No node port | | | kubernetes-dashboard | dashboard-metrics-scraper | No node port | | | kubernetes-dashboard | kubernetes-dashboard | No node port | | |----------------------|---------------------------|--------------|-----| # pick the service deployment # its on port 8080 # now make a port exposed minikube service --url demo-consume-api http: //127 .0.0.1:52260 ❗ 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: //127 .0.0.1:52260 /public/hello |
devops/docker/kubernetes/tutorial-win-minikube.1721852520.txt.gz · Last modified: by skipidar