Kubernetes example - replicaset yaml in declarative way

---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: my-rs
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-nginx
  template:
    metadata:
      labels:
        app: my-nginx
    spec:
      containers:
        - image: nginx:1.13
          name: nginx
          ports:
            - containerPort: 80