Bring up kubernetes with vagrant cd /etc/systemd/system/kubelet.service.d modify 10-kubeadm.conf add
Environment="KUBELET_NETWORK_ARGS=--network-plugin=kubenet --non-masquerade-cidr=10.10.0.0/16"
cd /etc/kubernetes/manifests vi kube-controller-manager.json "--allocate-node-cidrs=true" "--cluster-cidr=10.10.0.0/16"
restart the service
[vagrant@localhost ~]$ sudo su [root@localhost vagrant]# /bin/systemctl restart kubelet.service Warning: kubelet.service changed on disk. Run 'systemctl daemon-reload' to reload units. [root@localhost vagrant]# systemctl daemon-reload [root@localhost vagrant]#
set up e2e following instructions at http://blog.michali.net/2017/05/30/end-to-end-testing/ had to restart docker service docker restart
Brought up the local cluster in the first window To run kubenet, kubenet needs cni components.
The plugin requires a few things:
The standard CNI bridge, lo and host-local plugins are required, at minimum version 0.2.0. Kubenet will first search for them in /opt/cni/bin.
Download ( or build if you wish) the binaries from https://github.com/containernetworking/cni/releases tar -C /opt/cni/bin/ -xvf cni-amd64-v0.5.2.tgz
The hyperkube binary is an all in one binary, combining all the previously separate binaries.
make WHAT='cmd/kube-controller-manager'
make WHAT='cmd/hyperkube'
sudo LOG_LEVEL=4 API_HOST=10.0.2.15 ENABLE_RBAC=true -E PATH=$PATH NET_PLUGIN=kubenet WAIT_FOR_URL_API_SERVER=15 ./hack/local-up-cluster.sh -o _output/bin/
Got an error bring up the cluster, need to increase the api server wait time, WAIT_FOR_URL_API_SERVER=15
Waiting for apiserver to come up
!!! [0628 09:56:16] Timed out waiting for apiserver: to answer at http://127.0.0.1:6443/healthz; tried 10 waiting 1 between each
check apiserver logs: /tmp/kube-apiserver.log
Cleaning up...
Getting error running an e2e test -
go get github.com/onsi/ginkgo/ginkgo