Deploy a Kubernetes environment in SoftLayer with a single command! It's that simple.
Prerequisites:
- PIP -
sudo apt-get install python-pip python-dev build-essential
- SoftLayer CLI -
sudo pip install --upgrade pip softlayer
- Ansible v2.0 or newer-
sudo apt-get install ansible
- sshpass -
sudo apt-get install sshpass
- A default SSH key must exist on your local platform. If one does not exist, this can be created via the command
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
.
NOTE: If you encounter SSH issues running from Ubuntu, install sudo pip install requests[security]
first. If that does not eliminate the issue, you may be hitting an issue with GNOME Keyring. See this article for a fix.
Deployment:
Follow this procedure:
- First clone this project:
git clone https://github.com/patrocinio/kubernetes-softlayer.git
- Copy the file .envrc-template as .envrc:
cp .envrc-template .envrc
- Mandatory fields:
- Optional ones:
- TF_VAR_NUM_WORKERS: The number of worker nodes
- TF_VAR_NUM_MASTERS: The number of master nodes
- KUBELET_PORT_NUMBER: The port number that kubelet is listening (default is 10250)
- TF_VAR_CLOUD_REGION: The IBM Cloud region where the cluster is deployed
- Load the file in the current shell:
. ./.envrc
- Run the following command:
make all
Simple, no?
The process will go through a few phases:
- It creates the cloud resources, using Terraform
- It configures the virtual machines, using Ansible