-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing Istio fails when trying to match resources #762
Comments
kind by default runs Kubernetes v1.15.x at the moment
Have you looked at https://kind.sigs.k8s.io/docs/user/known-issues/ ? |
I don't think this is a bug in kind, I'm pretty sure this is an issue with how istio is being installed. |
Did you skip a step installing CRDs before installing the rest? Those errors relate to those resource types not existing yet. Since they are istio specific a normal Kubernetes cluster generally won't ship them out of the box. |
No, this snippet installs everything istio needs in any other kubernetes cluster I tried.
It is not with Istio only that I see the error, tried Knative too and similar error messages pop up. Only with kind as the cluster. Here is the command:
similar errors:
|
aside from the CRD issue, I wonder if anyone has tried installing Istio on Kind to check whether or not it works. |
The istio project has CI running on kind.. |
What other clusters did you try? Have you checked our known issues guide, is your kubectl too far off from the server version? |
what I noticed is that installing the CRDs fails first time around but if I try to redeploy after a little while it will successfully deploy. Basically similar to this comment knative/serving#2195 (comment) from the issue I linked earlier. I have tried GKE and IKS with the above installation instructions and I get Istio 1.1.11 without any problem. my kubectl is at v 1.14 so I doubt there is much regression between the version of the server and the client. |
This part:
Is both installing CRDs and installing CRs based on them, simultaneously. This is a bad idea, and a race. |
Installing istio from their latest docs works fine, which involves installing the CRDs seperately first: curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.2.2 sh -
cd istio-1.2.2
for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl apply -f $i; done
kubectl apply -f install/kubernetes/istio-demo.yaml |
I then followed this with https://knative.dev/docs/install/knative-with-any-k8s/ which says:
And this worked fine (on the same kind cluster). This is a problem with their install process. They should ensure that the CRDs are ready to serve before creating CRs from them. The workaround in their docs does however seem to work. |
Update: Knative docs actually has the instructions to use the crd selector. But more importantly, the race issue seems to have been addressed before (see kubernetes/kubernetes#62725 and the corresponding PR), so not sure if this is still a problem in the core of kubernetes. Also following the same install instructions, I dont seem to be able to reproduce this kind of race in any cluster other than Kind. That's why I wondered maybe Kind has an older version of Kube which like you said does not seem to be the case. so yeah I don't know 🤷♂ |
kubernetes/kubernetes#62725 is about solving the race when you create one shortly after, the problem here is simultaneously creating them. Think of a CRD (= CustomResourceDefinition) like a table schema in a relational database, and a CR (= CustomResource instance) as an entry in the matching table. Creating both CRDs and CRs at the same time is then like creating tables while also trying to insert entries into them. Each table needs to be created first, then you can insert. With the current installation instructions for both Istio and Knative, you do create the CRDs before the CRs, and this works fine. The old installation instructions were wrong. Trying to create CRs before the CRDs are serving from the API server is a bug in the API usage, it is possible to check that CRDs exist in the API before proceeding (or simply a pause between instructions will generally happen to work).
On some clusters it may be that you win this race. kind runs on a "noisy shared host" I.E. your development machine with less isolation / dedicated resources. |
@nimakaviani I created a local rancher, and install istio with that. Works fine for me. |
@rjshrjndrn which installation instructions did you use? The one I referenced or @BenTheElder ‘s or something else? |
@nimakaviani
|
Going to close this since the current istio / knative docs do not have this issue. If you have more questions please re-open or file a new issue 😅 |
What happened:
I wonder if anyone has tried installing Istio on kind. I get the following errors when trying to install Istio 1.1.11:
Looking at this issue knative/serving#2195 it appears to be due to a bug with the the earlier micro versions of K8s 1.11+.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kind version
): 0.4.0docker info
): 18.09/etc/os-release
): xenialThe text was updated successfully, but these errors were encountered: