I was testing my ingress and I deleted the following two gateways for testing purpose.
kubectl delete gateway istio-autogenerated-k8s-ingress -n istio-system
kubectl delete gateway istio-system-gateway -n istio-system
Since, then I am having this error upstream connect error or disconnect/reset before headers
for any url I access through the ingress-gateway
.
Is it related and if so, how can I set them up again? If not, how can I debug this?
I have tried to reinstall istio following this https://cloud.google.com/kubernetes-engine/docs/tutorials/installing-istio. However, it did not work nor did the two gateways got recreatted.
You can always reinstall the same Istio release by following the kubectl apply -f [...]
step of the Istio release files as listed in the tutorial. This should restore those deleted system objects.
Sidenote: never, ever, delete stuff from a namespace named *-system
.
You can debug this by looking at the istio-ingressgateway container logs.
as noted here, you should check your namespace is correctly labeled with istio-injection=enabled
kubectl describe ns <your namespace>
if not, add the correct label :
kubectl label namespace <your namespace> istio-injection=enabled