Sobes.tech
Junior

Have you ever configured deployment in Kubernetes/OpenShift?

sobes.tech AI

Answer from AI

Yes, I have configured deployment in Kubernetes and OpenShift. The process usually includes:

  • Creating manifests (YAML) for Deployment, Service, ConfigMap, and other resources.
  • Defining the container image and its tags.
  • Setting environment variables and secrets.
  • Configuring scaling (replicas).
  • Setting up readiness and liveness probes for monitoring the application's health.
  • In OpenShift, additionally working with projects (namespaces) and role configuration.

An example of a simple Deployment in Kubernetes:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
      - name: frontend
        image: myregistry/frontend:latest
        ports:
        - containerPort: 80

This allows automating and standardizing the deployment process of frontend applications.