Difference between revisions of "Kubernetes Hairpin-Proxy"
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
kubectl expose pod nginx-ingress-microk8s-controller-86rjl --type=NodePort --port=8080 -n ingress | kubectl expose pod nginx-ingress-microk8s-controller-86rjl --type=NodePort --port=8080 -n ingress | ||
``` | ``` | ||
+ | |||
+ | Pods are up | ||
+ | ``` | ||
+ | root@km1:~/src/hairpin-proxy# k get pods -n hairpin-proxy | ||
+ | NAME READY STATUS RESTARTS AGE | ||
+ | hairpin-proxy-controller-7b48d47458-xlzrt 1/1 Running 5 163m | ||
+ | hairpin-proxy-haproxy-5c8b4c9cf-84n6j 1/1 Running 0 7m51s | ||
+ | ``` | ||
+ | |||
+ | but curl hangs in a container curl -k http://minimal.uvoo.io | ||
+ | |||
+ | root@km1:~/src/hairpin-proxy# k get svc --all-namespaces | grep hair | ||
+ | hairpin-proxy hairpin-proxy ClusterIP 10.152.183.106 <none> 80/TCP,443/TCP 165mm | ||
+ | |||
+ | / # host minimal.uvoo.io | ||
+ | minimal.uvoo.io has address 10.152.183.106 |
Revision as of 00:14, 15 February 2021
Trying to get this to work on microk8s
https://github.com/compumike/hairpin-proxy
kubectl apply -f https://raw.githubusercontent.com/compumike/hairpin-proxy/v0.1.2/deploy.yml
kubectl get configmap -n kube-system coredns -o=jsonpath='{.data.Corefile}'
Still doesn't work
kubectl get svc -n ingress | grep ingress output: nginx-ingress-microk8s-controller-86rjl.ingress.svc.cluster.local kubectl edit deploy hairpin-proxy-haproxy -n hairpin-proxy # Modify with below spec: containers: - env: - name: TARGET_SERVER value: nginx-ingress-microk8s-controller-86rjl.ingress.svc.cluster.local image: compumike/hairpin-proxy-haproxy:0.1.2 kubectl expose pod nginx-ingress-microk8s-controller-86rjl --type=NodePort --port=8080 -n ingress
Pods are up
root@km1:~/src/hairpin-proxy# k get pods -n hairpin-proxy NAME READY STATUS RESTARTS AGE hairpin-proxy-controller-7b48d47458-xlzrt 1/1 Running 5 163m hairpin-proxy-haproxy-5c8b4c9cf-84n6j 1/1 Running 0 7m51s
but curl hangs in a container curl -k http://minimal.uvoo.io
root@km1:~/src/hairpin-proxy# k get svc --all-namespaces | grep hair
hairpin-proxy hairpin-proxy ClusterIP 10.152.183.106
/ # host minimal.uvoo.io minimal.uvoo.io has address 10.152.183.106