This guide provides a step by step instruction of how to deploy k8s cluster on bare metal or a virtual machine.
The recommended deployment target requirements:
Configure BM nodes (or the host running VMs) with the commands:
sysctl net.ipv4.ip_forward=1
sysctl net.bridge.bridge-nf-call-iptables=0
Note
If you deploy on Ubuntu Trusty BM nodes or host running your VM nodes, make sure you have at least Kernel version 3.19.0-15 installed and modprobe br_netfilter enabled. Lucky you, if your provisioning underlay took care for that! Otherwise you may want to persist that configuration change manually.
This is a node where to run the installer. Admin node should be Debian/Ubuntu based with the following packages installed:
Note
You could use one of the k8s node as an admin node. In this case this node should meet both k8s and admin node requirements.
Clone fuel-ccp-installer repository:
git clone https://review.openstack.org/openstack/fuel-ccp-installer
Create deployment script:
cat > ./deploy-k8s.sh << EOF
#!/bin/bash
set -ex
# CHANGE ADMIN_IP AND SLAVE_IPS TO MATCH YOUR ENVIRONMENT
export ADMIN_IP="10.90.0.2"
export SLAVE_IPS="10.90.0.2 10.90.0.3 10.90.0.4"
export DEPLOY_METHOD="kargo"
export WORKSPACE="${HOME}/workspace"
mkdir -p $WORKSPACE
cd ./fuel-ccp-installer
bash -x "./utils/jenkins/run_k8s_deploy_test.sh"
EOF
Note
You can also use ./utils/jenkins/deploy_k8s_cluster_example.sh as a starting point.
Note
If you deploy using libvirt with Ubuntu Trusty as a bare metal hypervisor or deploy on AWS, GCE, or OpenStack, , make sure to add export CUSTOM_YAML='ipip: true' to the ./deploy-k8s.sh file.
Run script:
bash ~/deploy-k8s.sh
Note
See Deploy a specific hyperkube image if you want to specify the location and version of the hyperkube image to use.