Kubernetes

Containers

Configuration

Deployment

A template for creating pods

apiVersion: apps/v1

kind: Deployment

metadata:

  name: myapp

  labels:

    app: myapp

spec:

  replicas: 2

  selector:

    matchlabels:

      app: myapp

  template:

    metadata:

      labels:

        app: myapp

    spec:

      containers:

        - name: myapp

          image: myimage

          env:

            - name: MYENV

              value: $MYENV

          ports:

            - containerPort: 8080