From 3c3d14b436333c6b16ba4637a2b3eddf652a2732 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Thu, 9 Apr 2020 00:52:30 -0700 Subject: [PATCH 1/3] improve wording on the docker push site --- site/content/en/docs/handbook/pushing.md | 33 +++++++++++++++--------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/site/content/en/docs/handbook/pushing.md b/site/content/en/docs/handbook/pushing.md index ed2cc65506..ef71e6cb5d 100644 --- a/site/content/en/docs/handbook/pushing.md +++ b/site/content/en/docs/handbook/pushing.md @@ -39,29 +39,38 @@ To point your terminal to use the docker daemon inside minikube run this: eval $(minikube docker-env) ``` -now any 'docker' command you run in this current terminal will run against the docker inside minikube VM or Container. -Try it: +now any 'docker' command you run in this current terminal will run against the docker inside minikube cluster. + +so if you do the following commands, it will show you the containers inside the minikube inside minikube's VM or Container. ```shell docker ps ``` -now you 'build' against the docker inside minikube. which is instantly accessible to kubernetes cluster. +now you can 'build' against the docker inside minikube. which is instantly accessible to kubernetes cluster. -''' -docker build -t myimage . -''' +```shell +docker build -t my_image . +``` -Remember to turn off the `imagePullPolicy:Always` (use `imagePullPolicy:IfNotPresent` or `imagePullPolicy:Never`), as otherwise Kubernetes won't use images you built locally. +To verify your terminal is using minikuber's docker-env you can check the value of the environment variable MINIKUBE_ACTIVE_DOCKERD to reflect the cluster name. {{% pageinfo %}} -Evaluating the docker-env is only valid for the current terminal. -and by closing the terminal, you will go back to using your own system's docker daemon. - -in some drivers such as Docker or Podman, you will need to re-do docker-env each time you restart your minikube. +Tip 1: +Remember to turn off the `imagePullPolicy:Always` (use `imagePullPolicy:IfNotPresent` or `imagePullPolicy:Never`) in your yaml file.otherwise Kubernetes won't use your locally build image and it will pull from the network. +{{% /pageinfo %}} + +{{% pageinfo %}} +Tip 2: +Evaluating the docker-env is only valid for the current terminal. +and by closing the terminal, you will go back to using your own system's docker daemon. +{{% /pageinfo %}} + +{{% pageinfo %}} +Tip 3: +In container-based drivers such as Docker or Podman, you will need to re-do docker-env each time you restart your minikube cluster. {{% /pageinfo %}} -To verify your terminal is using minikuber's docker-env you can check the value of the environment variable MINIKUBE_ACTIVE_DOCKERD to reflect the profile name. more information on [docker-env](https://minikube.sigs.k8s.io/docs/commands/docker-env/) From da2736d84e0ec1a531bae47bd75d7ca4e7425dd0 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Thu, 9 Apr 2020 01:01:22 -0700 Subject: [PATCH 2/3] add hot tips --- site/content/en/docs/handbook/pushing.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/site/content/en/docs/handbook/pushing.md b/site/content/en/docs/handbook/pushing.md index ef71e6cb5d..81a167d86a 100644 --- a/site/content/en/docs/handbook/pushing.md +++ b/site/content/en/docs/handbook/pushing.md @@ -86,15 +86,22 @@ minikube cache add alpine:latest The add command will store the requested image to `$MINIKUBE_HOME/cache/images`, and load it into the minikube cluster's container runtime environment automatically. -{{% pageinfo %}} -if your image changes after your cached it, you could do `cache reload` to ensure minikube gets the last updates. - -``` -shell +minikube refreshes the cache images on each start. however to reload all the cached images on demand run this command : +```shell minikube cache reload ``` + +{{% pageinfo %}} +Tip1 : +If your image changes after your cached it, you need to do 'cache reload' for minikube to pick up the image. {{% /pageinfo %}} +{{% pageinfo %}} +Tip2 : +if you have multiple cluster, cache command will load the image for all of them. +{{% /pageinfo %}} + + To display images you have added to the cache: ```shell @@ -117,6 +124,7 @@ For more information, see: ## 3. Pushing directly to in-cluster CRIO. (podman-env) +This is simmilar to docker-env but only for cri-o runtime. To push directly to CRIO, configure podman client on your mac/linux host using the podman-env command in your shell: ```shell From 3d0632043d5ff8e459db86ef8b973a72d76056d2 Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Fri, 10 Apr 2020 04:24:10 -0700 Subject: [PATCH 3/3] change color of tip --- site/content/en/docs/handbook/pushing.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/site/content/en/docs/handbook/pushing.md b/site/content/en/docs/handbook/pushing.md index 81a167d86a..90d6f9598b 100644 --- a/site/content/en/docs/handbook/pushing.md +++ b/site/content/en/docs/handbook/pushing.md @@ -55,18 +55,18 @@ docker build -t my_image . To verify your terminal is using minikuber's docker-env you can check the value of the environment variable MINIKUBE_ACTIVE_DOCKERD to reflect the cluster name. -{{% pageinfo %}} +{{% pageinfo color="info" %}} Tip 1: Remember to turn off the `imagePullPolicy:Always` (use `imagePullPolicy:IfNotPresent` or `imagePullPolicy:Never`) in your yaml file.otherwise Kubernetes won't use your locally build image and it will pull from the network. {{% /pageinfo %}} -{{% pageinfo %}} +{{% pageinfo color="info" %}} Tip 2: Evaluating the docker-env is only valid for the current terminal. and by closing the terminal, you will go back to using your own system's docker daemon. {{% /pageinfo %}} -{{% pageinfo %}} +{{% pageinfo color="info" %}} Tip 3: In container-based drivers such as Docker or Podman, you will need to re-do docker-env each time you restart your minikube cluster. {{% /pageinfo %}} @@ -86,18 +86,19 @@ minikube cache add alpine:latest The add command will store the requested image to `$MINIKUBE_HOME/cache/images`, and load it into the minikube cluster's container runtime environment automatically. +{{% pageinfo color="info" %}} +Tip 1 : +If your image changes after your cached it, you need to do 'cache reload'. +{{% /pageinfo %}} + + minikube refreshes the cache images on each start. however to reload all the cached images on demand run this command : ```shell minikube cache reload ``` -{{% pageinfo %}} -Tip1 : -If your image changes after your cached it, you need to do 'cache reload' for minikube to pick up the image. -{{% /pageinfo %}} - -{{% pageinfo %}} -Tip2 : +{{% pageinfo color="info" %}} +Tip 2 : if you have multiple cluster, cache command will load the image for all of them. {{% /pageinfo %}}