Closed ahmetb closed 4 years ago
The other day I was playing with 0.11 + Istio lean and while I could get my internet facing KnServices to work just fine, I couldn't get intra-cluster communications to work (or cluster-local services). I assumed it was a user-error and I just didn't configure things correctly. Might be related?
If I follow these istio lean instructions instead it works: https://knative.dev/docs/install/installing-istio/#installing-istio-with-sidecar-injection and gateway comes up.
However “without sidecar injection” template I think has something odd preventing it from working correctly.
/assign @tcnghia
@ahmetb what is the GKE/Istio add-on version?
@ahmetb This may be due to the Istio control plane version mismatch with the helm chart you are using.
@tcnghia no addon, everything is self-install. Knative v0.11.0, Istio 1.4.2, installed via helm template rendered from link in first comment.
@tcnghia the same version worked when I used the "sidecar injection enabled" mode of the chart template rendering command (though that cmd is also broken as it doesn't actually enable injection https://github.com/knative/docs/issues/2073).
I have verified the issue and found the root cause (if my produced issue is same with yours.)
What I observed is that:
istio-ingressgateway
pod. (You can reproduce the issue by restarting pod - e.g k delete pod -n istio-system istio-ingressgateway-xxx
.)The root cause and solutions are:
helm
sets ISTIO_AUTO_MTLS_ENABLED
true.TOBE:
- name: ISTIO_AUTO_MTLS_ENABLED
value: "false"
or you can set false
via helm as:
helm template --namespace=istio-system \
--set global.mtls.auto=false \
I still need to investigate if helm's bug or we need to update docs to set global.mtls.auto=false
explicitly.
I still need to investigate if helm's bug or we need to update docs to set global.mtls.auto=false explicitly.
It is not helm's bug. Default value is used from install/kubernetes/helm/istio/values.yaml
and the global.mtls.auto
is enabled by default by this commit https://github.com/istio/istio/pull/18312/files#diff-7dad29cba9d2ca3e8570c8f65f4b7e86R371.
@ahmetb can you please try what @nak3 suggested in https://github.com/knative/serving/issues/6254#issuecomment-567785377 ?
I don’t think mtls is necessarily the culprit here? https://knative.dev/docs/install/installing-istio/#installing-istio-with-sidecar-injection Applying this yaml doesn’t cause this problem, yet it doesn’t explicitly disables mtls?
https://knative.dev/docs/install/installing-istio/#installing-istio-with-sidecar-injection Applying this yaml doesn’t cause this problem, yet it doesn’t explicitly disables mtls?
Good point. The reason why the yaml w/ side-car injection does not cause the problem is that it deploys citadel and creates certs under /etc/certs/*
. You can check it in cluster-local-gateway pod:
$ kubectl exec -it cluster-local-gateway-xxx -n istio-system -- ls /etc/certs/
Also, if you want to produce the same issue w/ injection yaml, you can undeploy citadel pod and remove certs (secrets) by following steps:
$ kubectl scale --replicas=0 deployment -n istio-system istio-citadel
$ kubectl delete secrets -n istio-system istio.cluster-local-gateway-service-account
Then, try to restart cluster-local-gateway pod. You can see the same issue.
$ kubectl delete pod -n istio-system cluster-local-gateway-xxx
@nak3 that makes sense. :) But how should we fix docs?
/area networking /kind bug
I installed istio-lean without sidecar injection documented here from HEAD in v1.4.2.
All Istio and Knative serving components are working fine.
Then I proceeded to install
cluster-local-gateway
(https://knative.dev/docs/ install/installing-istio/#updating-your-install-to-use-cluster-local-gateway).It resulted in this file:
Now the
cluster-local-gateway-777c6c9d54-zrs84
pod isn't becoming ready. According todescribe pod
:Logs are flooded with
waiting for file
logs:I'm not sure what this:
but I am suspecting the
istio-lean
installation documented in the link above perhaps isn't compatible with v0.11 or cluster-local-gateway?