apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: nginx
  labels:
    app: server
    tier: server
spec:
  replicas: 3
  selector:
    matchLabels:
      app: server
      tier: server
    matchExpressions:
      - {key: tier, operator: In, values: [server]}
      - {key: app, operator: In, values: [server]}
  template:
    metadata:
      labels:
        app: server
        tier: server
    spec:
      containers:
        - name: nginx
          image: nginx:latest
          resources:
            limits:
              cpu: 100m
              memory: 100Mi
          ports:
            - containerPort: 80
