Junior
Have you configured which containers to start, how to scale replicas?
sobes.tech AI
Answer from AI
Yes, I have configured containers using Docker and managed scaling of replicas through Kubernetes. For example, for a frontend application, I created a Dockerfile, described the container with the necessary environment, and then set the number of replicas in Kubernetes Deployment to ensure fault tolerance and load balancing.
Example of scaling configuration in Kubernetes:
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend-deployment
spec:
replicas: 3 # number of replicas
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: my-frontend-image:latest
ports:
- containerPort: 80
This scaling allows for automatic load distribution and increased application availability.