DigitalOcean ❤ K8S

Look ma! Just click and having fun with Kubernetes on DigitalOcean

Geek alert! Kubernetes is currently in limited availability

1. Login to DigitalOcean dashboard and click to start

2. Select Kubernetes version

3. Add nodes (I use default with hello-k8s name)

4. It takes roughly 4 mins to set up…

5. Done!

6. Install kubectl for connect to k8s cluster

# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install kubectl
brew install kubernetes-cli
kubectl version

7. Click to go next step

8. Setup config

  • Scroll down to download config file
  • Place downloaded file anyway, just make sure you go to that folder in Terminal before run next step command
  • Test the connection
kubectl --kubeconfig="hello-k8s-kubeconfig.yaml" get nodes
  • Yes, it’s working!

9. Deploy a workload

kubectl --kubeconfig="hello-k8s-kubeconfig.yaml" apply -f ./my-manifest.yaml

You should see…

deployment.apps/nginx-deployment-example created

And

kubectl --kubeconfig="hello-k8s-kubeconfig.yaml" get services

You should see

10. Additional stuff

You can now able to add CronJob, Pod, ReplicaSet, Block Storage Volumes, Load Balancer to your cluster but I won’t do it now because I’m too lazy for that so I’ll leave that boring part to you! ;D


Note (ref)

You can get free $10 for DigitalOcean (which is 2 months free hosting).
You can get cheapest .io and nice UI/UX at NameCheap.

Happy Kubing!