Labels in L1-Q7

Hello all,

I do not understand why I failed (twice) in L1-Q7 of Kubernetes. Here is a screen shot.

Thank you for your help,

Best regards,

Vincent

Hi @Vincent-fr

Your ReplicaSet definition is missing the metadata.labels. Try checking it after adding the appropriate labels.

It would help if you could share the review link for this question, which is available in the screenshot attached.

1 Like

Getting same issue in my case, check the snapshot please,

Asked for Review

It’s not entirely clear where they want the labels to be “applied”. I did it redundantly, and the grader was happy with that:

apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: nginx-replicaset
  labels:
      app: nginx_app
      type: front-end
spec:
  # modify replicas according to your case
  replicas: 4
  selector:
    matchLabels:
      app: nginx_app
      type: front-end
  template:
    metadata:
      labels:
        app: nginx_app
        type: front-end
    spec:
      containers:
      - name: nginx-container
        image: nginx:latest