- Test Django
- Build container
- Push container to GitHub
- Update secrets
- Update deployment
- Wait rollout to finish
- Migrate database
- Collect static
Kubernetes Commands:
# Get commands with basic output
kubectl get services # List all services in the namespace
kubectl get pods --all-namespaces # List all pods in all namespaces
kubectl get pods -o wide # List all pods in the current namespace, with more details
kubectl get deployment my-dep # List a particular deployment
kubectl get pods # List all pods in the namespace
kubectl get pod my-pod -o yaml # Get a pod's YAML
1.1 Register to Hetzner Cloud
1.2 Create new project
- Location: Nuremberg
- Image: Ubuntu 20.04
- Type: Standard
- Servers: CPX11 or greater
- Volume: None
- Networking: Public IPv4, Public IPv6, Private networks
- Private Networks:
- Name: kubernetes
- IP Range: **172.16.0.0/16
- Firewalls: None
- Additional features: Placement group
- Placement group:
- Type: Spread
- Name: placement-group-1
- SSH Keys: Previosly created
- Name: master-1
cp ansible/inventory/bartoszcholewa.pl.example ansible/inventory/bartoszcholewa.pl
ansible/inventory/bartoszcholewa.pl
[masters]
master-1 ansible_host=<MASTER-1_IP> ansible_user=root
[workers]
worker-1 ansible_host=<WORKER-1_IP> ansible_user=root
worker-2 ansible_host=<WORKER-2_IP> ansible_user=root
[databases]
rds-1 ansible_host=<RDS-1_IP> ansible_user=root
/bin/bash /ansible/deploy_fresh.sh