Created
February 4, 2022 10:28
-
-
Save Yoshyn/0dab97ab9cb54b4a0cf66a1d59b54b9d to your computer and use it in GitHub Desktop.
Kind, istio and localhost access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kind installation : https://istio.io/latest/docs/setup/platform-setup/kind/ | |
kind create cluster --name istio-testing | |
kubectl config use-context kind-istio-testing | |
# Istio installation : https://istio.io/latest/docs/setup/getting-started/ | |
istioctl install --set profile=demo -y | |
... | |
# Mapping from host to k8s NodePort service on kind : https://banzaicloud.com/blog/kind-ingress/ | |
``` | |
for port in 80 443 | |
do | |
node_port=$(kubectl get service -n istio-system istio-ingressgateway -o=jsonpath="{.spec.ports[?(@.port == ${port})].nodePort}") | |
docker run -d --name istio-testing-kind-proxy-${port} \ | |
--publish 127.0.0.1:${port}:${port} \ | |
--link istio-testing-control-plane:target \ | |
--net kind \ | |
alpine/socat -dd tcp-listen:${port},fork,reuseaddr tcp-connect:target:${node_port} | |
done | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment