Walkthrough for setup Kubernetes on CoreOS on DigitalOcean.
- Create a new droplet via DO interface, and choose following options
- Droplet Hostname: master
- Select Size: Any
- Select Region: Any with private networking support
- Available Settings: "Private Networking", "Enable User Data"
- Put cloud-config to user data textarea
- Select Image: CoreOS (stable)
- Choose you SSH key
- Press a "Create a Droplet" button
When the droplet will be created, login to system:
ssh core@%MASTER_DROPLET_EXTERNAL_IP%
Take and remember internal ip address (Note: if you use other cloud provider, network interface may be different from eth1, if is true, you also have to change it in all cloud-configs):
echo $(ip addr | grep inet | grep eth1 | grep global | awk '{print $2}' | sed -e 's/\/.*$//')
Replace all %MASTER_IP% placeholders in node cloud-config to the master ip.
Create a new droplet via DO interface, and choose following options
- Droplet Hostname: node-001
- Select Size: Anyone you want
- Select Region: Must be same as the master node
- Available Settings: "Private Networking", "Enable User Data"
- Put your changed cloud-config with MASTER IP to user data textarea
- Select Image: CoreOS (stable)
- Choose you SSH key
- Press a "Create a Droplet" button
Login to your master instance:
ssh core@%MASTER_DROPLET_EXTERNAL_IP%
Download Kubectl:
sudo /usr/bin/wget -N -P /opt/bin https://storage.googleapis.com/kubernetes-release/release/v0.15.0/bin/linux/amd64/kubectl
sudo chmod +x /opt/bin/kubectl
Check whether the all your nodes registered in Kubernetes
/opt/bin/kubectl get nodes