Deployment
Deployment
The process of releasing an application to a production environment. Automation is the key.
Deployment
The process of releasing an application to a production environment. Automation is the key.
Deployment refers to the entire process of releasing a developed application to a production environment that real users can access. It goes beyond simply uploading code to a server and includes the entire pipeline through build, testing, staging, and production deployment.
Modern deployment strategies include Blue-Green deployment, Canary deployment, and Rolling deployment. Blue-Green maintains two identical environments and switches traffic between them, while Canary deploys to only a subset of users first to detect problems early. Rolling is a method of gradually replacing instances.
Deployment automation is at the core of DevOps. Automating everything from code commit to production deployment through a CI/CD pipeline reduces human error and increases deployment frequency. Tools such as GitHub Actions, Jenkins, and ArgoCD are widely used.
Zero-downtime deployment means deploying while maintaining service availability, and it has a direct impact on user experience. The Kubernetes Deployment resource supports such zero-downtime deployment by default, and performs health checks with readinessProbe and livenessProbe.
# Kubernetes Deployment with Rolling Update
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-server
labels:
app: api-server
spec:
replicas: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1 # 롤링 업데이트 중 추가 Pod 수
maxUnavailable: 0 # 무중단 배포 보장
selector:
matchLabels:
app: api-server
template:
metadata:
labels:
app: api-server
spec:
containers:
- name: api
image: myapp:v2.0.0
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 15
periodSeconds: 20
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
Senior: "Let's switch to Canary deployment starting with this release. Let's send only 5% of traffic to the new version first and monitor it."
Junior: "Then should I just set up an Analysis template in ArgoCD?"
Senior: "Right, let's set it up so that it automatically rolls back if the error rate exceeds 1% based on Prometheus metrics."
Interviewer: "Please explain the differences between Blue-Green deployment and Canary deployment, and when each is best used."
Candidate: "Blue-Green switches all traffic at once, enabling fast rollback, while Canary gradually increases traffic to reduce risk. I deploy important changes with Canary and urgent hotfixes with Blue-Green."
Take a mock interview on this topic → WIA SOOM AI Interview · Start for free
Reviewer: "Setting maxUnavailable: 1 may degrade the service during a rolling update. If zero downtime is important, change it to 0."
Developer: "Yes, and we should also increase readinessProbe initialDelaySeconds to account for the app's startup time."