-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[solved] Calico doesn't start correctly on minikube #1013
Comments
@ceridwen thanks for the report - I believe you're encountering this issue: kubernetes/minikube#1779 I think this is essentially an issue with minikube not including the necessary kernel features for Calico to run. However, looking at the upstream issue there appears to be some confusion as to whether or not it should be fixed, so I'll leave this issue open until we can sort it out. |
What do you mean? What could be the debate? ipset is fairly important for a lot of basic functions and calico is a very important component of many kubernetes applications. Not trying to sound offensive, just really confused on why that could be. |
I think he was referring to the conversation in this issue kubernetes/minikube#1697 |
Thank you so much. |
This was fixed with kubernetes/minikube#1817 and requires using a new minikube.iso. Until the next version of minikube is released (current is 0.21.0), the one built off that PR https://storage.googleapis.com/minikube-builds/1817/minikube.iso can be used when doing I'm going to close this issue for now since I believe it is resolved. Please comment or reopen if you do not agree. |
I verified it today with the new iso, it works. |
Is this |
minikube start --network-plugin=cni --host-only-cidr "192.168.0.0/16"
minikube start --network-plugin=cni --host-only-cidr "192.168.0.1/16"
minikube start --network-plugin=cni (calico datastore) Calico (datastore) errors minikube start --network-plugin=cni --host-only-cidr "192.168.99.1/24" (existing vboxnet0 address) (calico datastore): Same calico (datastore) errors as with no minikube start --network-plugin=cni (calico hosted install)
|
I'm using Calico with (not sure what's exactly necessary):
|
@sbueringer unfortunately that configuration causes localkube to go bananas here (tested 1.6.4 and 1.7.3). I'm using minukube compiled from HEAD, VirtualBox 5.1.26 on Fedora 26. minikube logs:
|
@gtirloni You might need to add a TBH, I'm not sure that what I've described is your problem though, unless those connection refused messages line up with those localkube/kubelet panics. You don't happen to have multiple VMs running that have that 192.168.99.100 address do you? That kind of intermittent behavior makes me think of issues I've had when I've tried to bring up multiple instances of vagrant machines all trying to use the same IP address. |
@tmjd specifying
I don't have multiple VMs running, only minikube's. I'm not sure this is an issue in minikube or calico. |
@gtirloni Can you try adding |
I executed it with these options:
And got the same issues shown here: #1013 (comment) |
Could you try just this?
You should then be able to deploy calico with If you want to use with etcd as the datastore, it is possible to deploy with a few slight modifications to this one
|
I was trying to get calico working on minikube today as well, and was having issues and tried out the instructions in this PR. Fair warning, I've never successfully installed calico or used it before, so I'll default to being overly verbose about my experience. Hopefully, this is valuable. I ran the commands listed in #1013 (comment) and had the following results
I think everything was looking good at this point. No big flashing errors, other than the "Unable to open configuration file" in the above output. I then added a simple nginx-deployment from https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#creating-a-deployment and observed the following results:
Hopefully, this helps. I'm happy to provide any other follow-up info I can. |
@beeradb Did you do |
@tmjd I did I also tried this both on xhyve and virtualbox with the same results. Not sure if the virtualization method actually matters here, though. |
I believe there may still be some inconsistency in minikube here. I was able to re-run using the minikube start command listed here: #1013 (comment) and had positive results.
However, when removing the So, to recap:
This was all tested on the following: minikube version: v0.21.0 |
@beeradb Thank you for your report on what worked or didn't for you. I've been spending some time trying to understand this and have figured out some options to make Calico work with minikube. There are 2 ways to run Calico policy-only mode and networking (which includes policy) mode. I'm going go through using both here, if you (or anyone) are able to try them out please report back your results.
Policy-only mode (Kubernetes networking)In this mode Calico is not setting up the networking but uses the 'host-local' plugin for IPAM so depends on K8s for IPAM. The minikube start command I found to work is: Minikube v0.21
Minikube v0.22For minikube v0.22.1 it seems like the options have changed, I found that the following worked with it:
I found that without CIDRAllocatorType or ClusterCIDR set on the controller-manager you would not have a working api-server. (@beeradb, I think this is what you saw when you didn't specify kubernetes 1.6.) After K8s is started with the above then it was possible to install calico with
Calico networking modeIn this mode Calico handles configuring the networking and provides policy. Minikube v0.21
Minikube v0.22
After K8s is started with the above then it is possible to install Calico though some slight modifications will need to be made to the manifests. The following commands can be used to pull down a manifest, update it, and then apply the manifest.
|
Thanks so much for the thorough response. I'll try to carve out some time this afternoon to test this and report back. |
I spent some time trying these out today and both versions worked as expected for me. I did not do a thorough test, but in both cases, I introduced a default-deny policy into the cluster and had networking restricted. Thanks again for your work on resolving this. |
Thanks!!! @tmjd .I tested your configuration with minikube:v0.23 and it works, thanks a lot. You saved me ! Calico networking modeMinikube v0.23
I was having issues with kubeadm hosted + Calico install (pls see issue: #1337. ) I think CIDR configuration with kubeadm is the problem there. |
@tmjd does this work version 0.24.1? I'm getting this message when I apply the modified calico.yaml: The Service "calico-etcd" is invalid: spec.clusterIP: Invalid value: "10.0.0.136": provided IP is not in the valid range. The range of valid IPs is 10.96.0.0/12z I'm guessing the sed command isn't working for me running on a Mac. what is exactly trying to be changed in the file? |
@taylorKonigsmark I have not tried 0.24.1. It looks like maybe minikube has changed the service CIDR they use. I think you should try again but not do What it was attempting to do was put the service IP created for the calico-etcd service into the used service CIDR. |
Thank you @tmjd! That helped a lot! |
Thanks everyone for this thread. I just got Calico v2.4 running on Minikube 2.7 following the above comments. my environmentI'm using a MacBook Pro with the latest stable Docker for Mac 18.03.1-ci-mac65 installed. It comes with hyperkit v0.20171204-60-g0e5b6b. I installed kubectl with install Minikube
install Callico v2.4This downloads and adjusts the yaml before applying it. It removes the nodeSelector filter. Is it possible to instead make it so that the node is the master node?
Here are all the pods running:
I haven't tried with a newer Calico yet, but I'm about to. reset environmentI'm new to this. Here is what has been working for me to reset my environment.
|
This works fine with Calico v3.1 as well. install Calico v3.1
|
Quick testing indicates that only |
@bcreane thanks for digging in to this. Is there a bug for Felix not correcting populating iptables / ipsets rules when on |
Expected Behavior
Installing Calico on minikube should start both containers in the calico-node pod.
Current Behavior
I recently upgraded minikube to 0.21, which means deleting the cluster and reinstalling it. When I tried to reinstall Calico, the calico-node container in the calico node pod never comes up, and networking is broken.
I'm running minikube with
minikube start --network-plugin=cni --host-only-cidr=192.168.0.0/16
, using virtualbox as the driver.The logs for calico-node contain entries like:
Steps to Reproduce (for bugs)
minikube start --network-plugin=cni --host-only-cidr=192.168.0.0/16
kubectl apply -f https://docs.projectcalico.org/v2.4/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.6/calico.yaml
Context
I'm trying to create a working development environment for testing network policy on my local machine so I don't have to depend on a remote cluster for doing development work. I know this is beta software, but it was working so I suspect that a change in Calico or minikube is responsible.
Your Environment
Calico: v2.4
minikube: v0.21.0, Kubernetes version 1.7.0
OS: Mac OS X 10.12.6
The text was updated successfully, but these errors were encountered: