darumatic/kubespray

By darumatic

Updated over 7 years ago

Container with all the dependencies required to run kubespray.

Image
1

63

Container with all the dependencies required to run kubespray. To be able to ssh into the VMs from inside the container mount your ssh keys into /root/.ssh/

Step 1: Run docker container with local ssh keys (v1.0)

docker run -v ~/.ssh:/root/.ssh -it darumatic/kubespray:1.0

Dockerfile: https://github.com/darumatic/docker/blob/master/kubespray/Dockerfile

For more information about kubespray: see http://kubespray.io

Example for creating the ansible inventory file for a cluster with 2 VMs (One master / one node) from a VPS provider (Replace xx.yy.zz.vv with the ip address of a server):

Step 2: Create ansible inventory

kubespray prepare --nodes k8-poc-node1[ansible_ssh_host=xx.yy.zz.vv] --masters k8-poc-master[ansible_ssh_host=xx.yy.zz.vv] cat /root/.kubespray/inventory/inventory.cfg

NOTE: Ensure firewalls are disabled on the VMs otherwise the installation will fail, due to connectivity issues between cluster components. See https://coreos.com/kubernetes/docs/latest/kubernetes-networking.html for more information about which ports are required. Also your current user must be able to ssh into the VMs for ansible to work correctly

Step 3: Run the deploy task

kubespray deploy

Access cluster

kubectl is available in this container, use basic auth or certificates to connect to your new cluster.

Docker Pull Command

docker pull darumatic/kubespray