Docker | Kubernetes |
---|---|
container tech, isolated env for apps | infra management, multiple containers |
automated builds and deploy apps - CI | automated scheduling and management of app containers |
platform for config, build & destribute containers | ecosystem for managing cluster of containers |
Docker Swarn | Kubernetes |
---|---|
complex install | easy install |
high learning curve, but powerful | easy to use, limited functionality |
auto-scaling | manual scaling |
built in monitoring | N/A |
manual load balancing | auto load balancing |
kubectl create deployment example-db-depl --image=abhijitwakchaure/example-db:1.0.0 --port=8081 --replicas=2
OR
kubectl apply -f db-deployment.yml
kubectl apply -f app-service.yml
kubectl expose deployment example-db-depl --name=example-db-srv --port=8081 --target-port=8081 --type ClusterIP
kubectl scale deployment example-app-depl --replicas=5
for n in {1..100}; do printf "%5s" "$n. "; curl http://192.168.49.2:31277; echo ""; sleep 0.3; done
kubectl get deploy -o yaml | linkerd inject - | kubectl apply -f -
helm create example-chart
Test the rendered/compiled yaml files before install
helm install my-chart example-chart --dry-run
Now deploy the chart
helm install my-chart example-chart
OR using custom values
helm install my-chart example-chart -f customValues.yml
helm delete my-chart