How to fix calico.yaml for kubernetes cluster?

10/5/2016

Trying several options to resolve the issue with weave-net (How to fix weave-net CrashLoopBackOff for the second node?), I have decided to try calico instead of weave-net. The documentation for kubernetes tells I need only one or another. The command (as per documentation here https://github.com/projectcalico/calico-containers/tree/master/docs/cni/kubernetes/manifests/kubeadm) fails:

vagrant@vm-master:~$ sudo kubectl create -f https://github.com/projectcalico/calico-containers/blob/master/docs/cni/kubernetes/manifests/kubeadm/calico.yaml
yaml: line 6: mapping values are not allowed in this context

What I am doing wrong? Is it known issue? How can I fix/workaround it?

-- Andrew
kubernetes
project-calico

2 Answers

9/30/2017

Simply replace your HTML URL with raw data URL, it will work.

-- Suraj Narwade
Source: StackOverflow

10/6/2016

You need to reference the raw YAML file in your command, instead of the full GitHub HTML document:

kubectl create -f https://raw.githubusercontent.com/projectcalico/calico-containers/master/docs/cni/kubernetes/manifests/kubeadm/calico.yaml
-- Zahlex
Source: StackOverflow