What Is DOKS?
DigitalOcean Kubernetes (DOKS) is a managed Kubernetes service. DigitalOcean handles the control plane (API server, etcd, scheduler) — you just manage your workloads. No master node fees.
Pricing
The control plane is free. You only pay for worker nodes (Droplets) and any load balancers or storage you add.
| Cluster Size | Worker Nodes | Monthly Cost |
|---|---|---|
| Small (dev/test) | 2× Basic 2GB | ~$24/mo |
| Medium (production) | 3× Premium 4GB | ~$72/mo |
| Large (high traffic) | 3× Premium 8GB | ~$144/mo |
Step 1: Create a Cluster
- Go to Kubernetes in the DigitalOcean dashboard
- Click Create Cluster
- Choose Kubernetes version (latest stable recommended)
- Select a region close to your users
- Choose node pool size (start with 2-3 nodes)
- Name your cluster and click Create
Provisioning takes 4-5 minutes.
Step 2: Connect with kubectl
# Install doctl (DigitalOcean CLI)
brew install doctl
# Authenticate
doctl auth init
# Download kubeconfig
doctl kubernetes cluster kubeconfig save your-cluster-name
# Verify connection
kubectl get nodes
brew install doctl
# Authenticate
doctl auth init
# Download kubeconfig
doctl kubernetes cluster kubeconfig save your-cluster-name
# Verify connection
kubectl get nodes
Step 3: Deploy Your First App
# Create a deployment
kubectl create deployment nginx --image=nginx --replicas=2
# Expose it via LoadBalancer
kubectl expose deployment nginx --port=80 --type=LoadBalancer
# Check the external IP
kubectl get svc nginx -w
kubectl create deployment nginx --image=nginx --replicas=2
# Expose it via LoadBalancer
kubectl expose deployment nginx --port=80 --type=LoadBalancer
# Check the external IP
kubectl get svc nginx -w
The LoadBalancer automatically provisions a DigitalOcean Load Balancer ($12/mo).
Step 4: Set Up Ingress (Optional)
For multiple services behind one load balancer, use an Ingress controller:
# Install NGINX Ingress Controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.0/deploy/static/provider/do/deploy.yaml
# Verify it's running
kubectl get pods -n ingress-nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.0/deploy/static/provider/do/deploy.yaml
# Verify it's running
kubectl get pods -n ingress-nginx
DOKS vs Other Managed Kubernetes
| Feature | DOKS | EKS (AWS) | GKE (Google) |
|---|---|---|---|
| Control Plane Cost | Free | $73/mo | Free (Autopilot) |
| Min Worker Cost | ~$12/mo | ~$15/mo | ~$10/mo |
| Setup Complexity | Low | High | Medium |
| Auto-scaling | ✅ | ✅ | ✅ |
| Monitoring | Built-in | CloudWatch | Cloud Monitoring |
Best Practices
- Use node pools to separate workload types (CPU-intensive vs memory-intensive)
- Enable auto-scaling for production clusters
- Use DigitalOcean Container Registry (DOCR) for private images
- Set resource requests and limits on all pods
- Enable monitoring in the DOKS dashboard
🎁 Try DOKS with $200 Free Credit
Deploy a Kubernetes cluster risk-free. $200 credit covers weeks of testing.
Claim Free Credit →