From d53a071aedac0d9be6fe1f992b548ceee111394e Mon Sep 17 00:00:00 2001 From: Marcus Puckett Date: Tue, 16 Nov 2021 23:14:55 -0800 Subject: [PATCH] Add Windows commands to docs Some of the doc pages don't have Windows versions of some of the commands. I've added cross OS/shell versions for some of them. --- site/content/en/docs/handbook/config.md | 24 +++++++++++ site/content/en/docs/handbook/kubectl.md | 43 +++++++++++++++++++- site/content/en/docs/handbook/pushing.md | 51 +++++++++++++++++++++--- 3 files changed, 112 insertions(+), 6 deletions(-) diff --git a/site/content/en/docs/handbook/config.md b/site/content/en/docs/handbook/config.md index b2168b6850..0dd92e0c60 100644 --- a/site/content/en/docs/handbook/config.md +++ b/site/content/en/docs/handbook/config.md @@ -124,11 +124,35 @@ Some features can only be accessed by minikube specific environment variables, h ### Example: Disabling emoji +{{% tabs %}} + +{{% linuxtab %}} + ```shell export MINIKUBE_IN_STYLE=false minikube start ``` +{{% /linuxtab %}} + +{{% mactab %}} + +```shell +export MINIKUBE_IN_STYLE=false +minikube start +``` + +{{% /mactab %}} + +{{% windowstab %}} + +```shell +$env:MINIKUBE_IN_STYLE=false +``` + +{{% /windowstab %}} +{{% /tabs %}} + ### Making environment values persistent To make the exported variables persistent across reboots: diff --git a/site/content/en/docs/handbook/kubectl.md b/site/content/en/docs/handbook/kubectl.md index 22d398ed38..fcdcb5e539 100644 --- a/site/content/en/docs/handbook/kubectl.md +++ b/site/content/en/docs/handbook/kubectl.md @@ -16,7 +16,14 @@ However if `kubectl` is not installed locally, minikube already includes kubectl minikube kubectl -- ``` -You can also `alias kubectl="minikube kubectl --"` for easier usage. +{{% tabs %}} + +{{% linuxtab %}} +You can also alias kubectl for easier usage. + +```shell +alias kubectl="minikube kubectl --" +``` Alternatively, you can create a symbolic link to minikube's binary named 'kubectl'. @@ -24,6 +31,40 @@ Alternatively, you can create a symbolic link to minikube's binary named 'kubect ln -s $(which minikube) /usr/local/bin/kubectl ``` +{{% /linuxtab %}} + +{{% mactab %}} +You can also alias kubectl for easier usage. + +```shell +alias kubectl="minikube kubectl --" +``` + +Alternatively, you can create a symbolic link to minikube's binary named 'kubectl'. + +```shell +ln -s $(which minikube) /usr/local/bin/kubectl +``` + +{{% /mactab %}} + +{{% windowstab %}} +You can also alias kubectl for easier usage. + +```shell +Set-Alias -Name "kubectl" -Value "minikube kubectl --" +``` + +Alternatively, you can create a symbolic link to minikube's binary named 'kubectl'. + +```shell +New-Item -Path (Get-Command minikube).Path -ItemType SymbolicLink -Value C:\minikube\minikube.exe +``` + +{{% /windowstab %}} + +{{% /tabs %}} + Get pods ```shell diff --git a/site/content/en/docs/handbook/pushing.md b/site/content/en/docs/handbook/pushing.md index ac075dbcba..faa0d424ec 100644 --- a/site/content/en/docs/handbook/pushing.md +++ b/site/content/en/docs/handbook/pushing.md @@ -54,9 +54,29 @@ This means you don't have to build on your host machine and push the image into To point your terminal to use the docker daemon inside minikube run this: +{{% tabs %}} +{{% linuxtab %}} ```shell eval $(minikube docker-env) ``` +{{% /linuxtab %}} +{{% mactab %}} +```shell +eval $(minikube docker-env) +``` +{{% /mactab %}} +{{% windowstab %}} +Powershell +```shell +& minikube -p minikube docker-env --shell powershell | Invoke-Expression +``` + +cmd +```shell +@FOR /f "tokens=*" %i IN ('minikube -p minikube docker-env --shell cmd') DO @%i +``` +{{% /windowstab %}} +{{% /tabs %}} Now any 'docker' command you run in this current terminal will run against the docker inside minikube cluster. @@ -139,6 +159,8 @@ For more information, see: ## 3. Pushing directly to in-cluster CRI-O. (podman-env) +{{% tabs %}} +{{% linuxtab %}} This is similar to docker-env but only for CRI-O runtime. To push directly to CRI-O, configure podman client on your host using the podman-env command in your shell: @@ -148,9 +170,6 @@ eval $(minikube podman-env) You should now be able to use podman client on the command line on your host machine talking to the podman service inside the minikube VM: -{{% tabs %}} -{{% linuxtab %}} - ```shell podman-remote help ``` @@ -167,12 +186,20 @@ Note: On Linux the remote client is called "podman-remote", while the local prog {{% /linuxtab %}} {{% mactab %}} +This is similar to docker-env but only for CRI-O runtime. +To push directly to CRI-O, configure podman client on your host using the podman-env command in your shell: + +```shell +eval $(minikube podman-env) +``` + +You should now be able to use podman client on the command line on your host machine talking to the podman service inside the minikube VM: ```shell podman help ``` -now you can 'build' against the storage inside minikube, which is instantly accessible to kubernetes cluster. +Now you can 'build' against the storage inside minikube, which is instantly accessible to kubernetes cluster. ```shell podman build -t my_image . @@ -184,8 +211,22 @@ Note: On macOS the remote client is called "podman", since there is no local "po {{% /mactab %}} {{% windowstab %}} +This is similar to docker-env but only for CRI-O runtime. +To push directly to CRI-O, configure podman client on your host using the podman-env command in your shell: -now you can 'build' against the storage inside minikube, which is instantly accessible to kubernetes cluster. +Powershell +```shell +& minikube -p minikube podman-env --shell powershell | Invoke-Expression +``` + +cmd +```shell +@FOR /f "tokens=*" %i IN ('minikube -p minikube podman-env --shell cmd') DO @%i +``` + +You should now be able to use podman client on the command line on your host machine talking to the podman service inside the minikube VM: + +Now you can 'build' against the storage inside minikube, which is instantly accessible to kubernetes cluster. ```shell podman help