I am trying to do some research on replicaSet for my learning purpose. I was able to create a replicaSet successfully with matchLabels. To test the matchExpression selector, I c
Can you try with the following by changing the label in template section.
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: replicaset-2
spec:
replicas: 2
selector:
matchExpressions:
- {key: tier, operator: In, values: [frontend1]}
template:
metadata:
labels:
tier: frontend1
spec:
containers:
- name: nginx
image: nginx