DMCA.com Protection Status Trending Topics About Devops: 05/20/21

Thursday, 20 May 2021

Creating a Deployment

The following is an example of a Deployment. It creates a ReplicaSet to bring up three nginx Pods: 

apiVersion: apps/v1

kind: Deployment

metadata:

  name: nginx-deployment

  labels:

    app: nginx

spec:

  replicas: 3

  selector:

    matchLabels:

      app: nginx

  template:

    metadata:

      labels:

        app: nginx

    spec:

      containers:

      - name: nginx

        image: nginx:1.14.2

        ports:

        - containerPort: 80