From a96d8f051d538a09d0ccb04b574fa5e9dd03ccb9 Mon Sep 17 00:00:00 2001 From: Alonyb Date: Fri, 17 Apr 2020 20:42:29 -0500 Subject: [PATCH] delete windows and mac doc --- .../includes/registry_addon_mac_windows.inc | 102 ------------------ 1 file changed, 102 deletions(-) delete mode 100644 site/content/en/docs/drivers/includes/registry_addon_mac_windows.inc diff --git a/site/content/en/docs/drivers/includes/registry_addon_mac_windows.inc b/site/content/en/docs/drivers/includes/registry_addon_mac_windows.inc deleted file mode 100644 index 02a8aee77..000000000 --- a/site/content/en/docs/drivers/includes/registry_addon_mac_windows.inc +++ /dev/null @@ -1,102 +0,0 @@ ---- - -## Table for different drivers. -The registry addon works in all OS, to use it depends on the driver you built your cluster with, If you are using container system (Docker, Podman) in Mac or Windows OS it has some limitation, is this case you will have to use the forwarded port for 5000. - -Here is a table to help you with registry addon: - -| Drivers | Port | -|--- |--- |--- |--- |--- | -| Docker driver on Linux | 5000 | -| Docker driver on Mac and windows | Random | -| All other drivers | 5000 | - ---- - -## Requirements - -* Registry addon enabled - -## Start minikube enabling registry addon - -Open a shell console, and run the following command: - -```bash -minikube start --addons=registry -``` - ---- -### How to connec to registry on VM drivers on windows - -Build docker image and tag it appropriately: - -```shell -docker build --tag $(minikube ip):$(docker inspect --format '{{(index (index .NetworkSettings.Ports "5000/tcp") 0).HostPort}}'/test-img . -``` - -In order to make docker accept pushing images to this registry, we have to redirect port 5000 on the docker virtual machine over to port 5000 on the minikube machine. Unfortunately, the docker vm cannot directly see the IP address of the minikube vm. To fix this, you will have to add one more level of redirection. - -Use kubectl port-forward to map your local workstation to the minikube vm - -```shell -kubectl port-forward --namespace kube-system 5000:5000 -``` - -On your local machine you should now be able to reach the minikube registry by using curl `http://localhost:5000/v2/_catalog` - -From this point we can (ab)use docker’s network configuration to instantiate a container on the docker’s host, and run socat there to redirect traffic going to the docker vm’s port 5000 to port 5000 on your host workstation. - -```shell -docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:host.docker.internal:5000" -``` - - Push docker image to minikube registry: - -```shell -docker push $(minikube ip):$(docker inspect --format '{{(index (index .NetworkSettings.Ports "5000/tcp") 0).HostPort}}' /test-img -``` - ---- -### How to connect to regsitery for Docker driver on Mac and Windows - -Build docker image and tag it appropriately: - -```shell -docker build --tag $(minikube ip):$(docker inspect --format '{{(index (index .NetworkSettings.Ports "5000/tcp") 0).HostPort}}'/test-img . -``` - -In order to make docker accept pushing images to this registry, we have to redirect port 5000 on the docker virtual machine over to port 5000 on the minikube machine. We can (ab)use docker’s network configuration to instantiate a container on the docker’s host, and run socat there: - -```shell -docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:host.docker.internal:5000" -``` - -Push docker image to minikube registry: - -```shell -docker push $(minikube ip):$(docker inspect --format '{{(index (index .NetworkSettings.Ports "5000/tcp") 0).HostPort}}' /test-img -``` - -### How to connect to resgitry for all other drivers - -Build docker image and tag it appropriately: - -```shell -docker build --tag $(minikube ip):5000'/test-img . -``` - -In order to make docker accept pushing images to this registry, we have to redirect port 5000 on the docker virtual machine over to port 5000 on the minikube machine. We can (ab)use docker’s network configuration to instantiate a container on the docker’s host, and run socat there: - -```shell -docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:host.docker.internal:5000" -``` - -Push docker image to minikube registry: - -```shell -docker push $(minikube ip):5000 /test-img -``` - -After the image is pushed, refer to it by `localhost:5000/{name}` in kubectl specs. - -* For more information, documentation ([Pushing to an in-cluster using Registry addon](https://minikube.sigs.k8s.io/docs/handbook/pushing/#4-pushing-to-an-in-cluster-using-registry-addon)) \ No newline at end of file -- GitLab