enter image description hereI don't' see why adding selector when we are creating replicaSet I thought maybe we can select different pod but we can't so I don't see what is used for
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: rs-name
spec:
replicas: 2
selector: // here the selector
matchLabels:
podptr: my-pod-l
template:
metadata:
name: pods-name
labels:
podptr: my-pod-l // here it's lable
spec:
containers:
- name: cons-name
image: nginx
ports:
- containerPort: 50