Reputation: 2441
It seems like get.k8s.io is the recommended way to deploy a Kubernetes cluster, but Digital Ocean isn't supported by this script.
Is there an alternate way to easily set up a cluster on Digital Ocean that I've missed?
Thanks
Upvotes: 5
Views: 5160
Reputation: 656
You can also use Kubeadm. Today I have installed a Kubernet cluster on digital ocean using Kubeadm.
It seems Kubeadm is a google developed tool and going to be google's recommended way soon. Though, as of today it is in alpha state now.
The details are given here Using kubeadm to Create a Cluster | Kubernetes
Upvotes: 2
Reputation: 51
You can use kubicorn
to create a fairly dope kubernetes cluster in Digital Ocean pretty easily. Here are the steps needed to do so:
// Install kubicorn
go get github.com/kris-nova/kubicorn
// Configure your auth
export DIGITALOCEAN_ACCESS_TOKEN=*****************************************
// Create your kubernetes profile from the default profile
kubicorn create mycluster --profile do
// Tweak your cluster as you like
kubicorn edit mycluster
// Apply your profile
kubicorn apply mycluster -v 4
// Use kubectl to access your cluster
kubectl get no
Note that kubicorn
is vendored to be a library as well as a command line tool, so you should probably be able to also include this logic in a program if you'd like.
Source: https://www.nivenly.com/kubernetes-on-digital-ocean-with-encrypted-vpn-service-mesh/
Upvotes: 3
Reputation: 580
You can do it manually, or using Ansible. I would suggest that you take a look at this github repo https://github.com/kubernetes-incubator/kubespray/blob/master/contrib/inventory_builder/inventory.py
You can actually deploy a working, multi-node, TLS-secured, production ready k8s cluster just by following these simple steps:
1) Create one or more machines on your favourite cloud hosting provider
You can use a Terraform script or do it by hand.
2) git clone https://github.com/kubernetes-incubator/kubespray/blob/master/contrib/inventory_builder/inventory.py
3) touch ./kubespray/inventory/inventory.cfg
4) Edit the file you've just created and do something like:
[etcd]
<master-ip>
[kube-master]
<master-ip>
[kube-node]
<node1-ip>
<node2-ip>
<node3-ip>
[k8s-cluster:children]
kube-node
kube-master
Look at the inventory example file for reference
5) install ansible on your machine via brew or apt-get e.g.
brew install ansible
6) run the ansible playbook
ansible-playbook -u root -b -i inventory/inventory.cfg cluster.yml
The user depends upon the Linux Distro you chose to deploy on the machines, but make sure that the use you select has root access.
Check out this youtube video: https://www.youtube.com/watch?v=N9q51JgbWu8&t=339s
Upvotes: 2
Reputation: 7768
You can use this a start point. I have used it too.
https://github.com/jiteshmohan/kubernetes-do
I got an old version of my current scripts to deploy my personal cluster to DO using terraform if you want to take a look.
https://github.com/cescoferraro/kubernetes-do
LOoks like Skippbox came up with a nice tool to deploy a single kubernetes instance on DO:
https://github.com/skippbox/kmachine
Upvotes: 0