devops:docker:kubernetes:tutorial-win-minikube
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devops:docker:kubernetes:tutorial-win-minikube [2024/06/19 19:54] – skipidar | devops:docker:kubernetes:tutorial-win-minikube [2024/07/24 20:22] (current) – skipidar | ||
---|---|---|---|
Line 9: | Line 9: | ||
- | == Use == | + | == After restart - make sure its running == |
+ | Make sure docker desktop is running after restart | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | == Use minikube | ||
<sxh> | <sxh> | ||
Line 16: | Line 21: | ||
{{https:// | {{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.1718826898.txt.gz · Last modified: by skipidar