Day 63 of 100 Days of DevOps | Task Failed even if the app was accessible

I have completed the task successfully but it failed to recognise the namespace resulting in failure of the task.

did this happened to anyone or I’m doing smething wrong ??





apiVersion: v1
kind: Namespace
metadata:
  name: iron-namespace-datacentre
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: iron-gallery-deployment-datacentre
  namespace: iron-namespace-datacentre
  labels:
    run: iron-gallery
spec:
  replicas: 1
  selector:
    matchLabels:
      run: iron-gallery
  template:
    metadata:
      labels:
        run: iron-gallery
    spec:
      containers:
      - image: kodekloud/irongallery:2.0
        name: iron-gallery-container-datacentre
        resources:
          limits:
            cpu: "50m"
            memory: "100Mi"
        volumeMounts:
        - name: config
          mountPath: /usr/share/nginx/html/data
        - name: images
          mountPath: /usr/share/nginx/html/uploads
      volumes:
      - name: config
        emptyDir: {}
      - name: images
        emptyDir: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: iron-db-deployment-datacentre
  namespace: iron-namespace-datacentre
  labels:
    db: mariadb
spec:
  replicas: 1
  selector:
    matchLabels:
      db: mariadb
  template:
    metadata:
      labels:
        db: mariadb
    spec:
      containers:
      - name: iron-db-container-datacenter
        image: kodekloud/irondb:2.0
        env:
        - name: MYSQL_DATABASE
          value: "database_web"
        - name: MYSQL_ROOT_PASSWORD
          value: "R00tP@ssw0rd!2025"
        - name: MYSQL_USER
          value: "appuser"
        - name: MYSQL_PASSWORD
          value: "C0mpl3xP@ss!2025"
        volumeMounts:
        - name: db
          mountPath: /var/lib/mysql
      volumes:
      - name: db
        emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
  name: iron-db-service-datacentre
  namespace: iron-namespace-datacentre
spec:
  selector:
    db: mariadb
  ports:
  - targetPort: 3306
    port: 3306
    protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
  name: iron-gallery-service-datacentre
  namespace: iron-namespace-datacentre
spec:
  type: NodePort
  selector:
    run: iron-gallery
  ports:
  - targetPort: 80
    port: 80
    nodePort: 32678
    protocol: TCP

Hi @Vamshi.Krishna

Your manifests look good for the task, and that should have been a pass.
Can you please try this again?

I just tried the lab and it worked fine at my end.

This worked for the second time, but it took my streak away :grin:

thought there must be something wrong in the validation part which may effect others as well.

when there are so many red lines means this is a kodekloud issue. :sweat_smile: