Thanksgiving DealsAmazon USThanksgiving week: Black Friday picks start earlyAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanThanksgiving DealsAmazon USDo not wait for the rush - compare today's dealsAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog

Iron Gallery on Kubernetes: Day 63 Deployment Guide

By Freedom251 Team · · 8 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Day 63’s Iron Gallery deployment creates one namespace, two one-replica Deployments, and two Services. The gallery runs from kodekloud/irongallery:2.0 and is reachable through a NodePort on TCP 32678; the MariaDB workload is exposed only inside the cluster through a ClusterIP Service on TCP 3306. The lab’s initial success condition is an installation page, not a fully configured frontend-to-database application.

This guide keeps the lab’s exact resource values, shows a complete manifest, and separates exercise-specific choices from normal Kubernetes behavior. Replace the -xfusion suffix only when your own challenge prompt requires a different suffix, and use that suffix consistently on every resource.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does Day 63 require?

The exercise creates five Kubernetes objects in the namespace iron-namespace-xfusion:

  1. Gallery Deployment: iron-gallery-deployment-xfusion, one replica, label run: iron-gallery, image kodekloud/irongallery:2.0, and container limits of 100Mi memory and 50m CPU.
  2. Database Deployment: one replica of kodekloud/irondb:2.0, labeled db: mariadb.
  3. Gallery Service: a NodePort that sends TCP port 32678 on a node to port 80 in the gallery Pod.
  4. Database Service: a ClusterIP that sends TCP port 3306 to the database Pods.
  5. Namespace: the boundary that keeps these lab resources together.

The challenge requires emptyDir volumes for the gallery’s configuration and uploads, plus an emptyDir mounted at /var/lib/mysql for the database. Those are deliberately simple lab storage choices, not a recommendation for preserving production data. The original challenge specification and a separate walkthrough provide the naming and port requirements; see the challenge specification and published walkthrough for the exercise context.

Popular on Amazon
Sale
Silkland 40Gbps USB C 90 Degree Right Angle Adapter 2 Pack, 240W USB4 | Male to Female Extender, 8K@60Hz, Thunderbolt 4/3, Steam Deck, ROG Ally, MacBook, Switch 2, iPhone 18/17/16/15, Quest 3 VR
  • 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
  • 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
  • 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
  • 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
  • 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.

What do you need before applying the YAML?

You need a working Kubernetes context, permission to create namespaces, Deployments, and Services, and the kubectl command-line client pointed at that cluster. Confirm the context before changing anything:

kubectl config current-context
kubectl cluster-info

If your lab prompt uses a suffix such as -devops or -datacenter instead of -xfusion, substitute that suffix in every name below. Do not combine names from different versions of the challenge.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The cited Day 63 materials state that the database image expects environment variables, but they do not publish the variable names or values. Do not invent them. If your lab statement supplies database variables, add those exact entries to the database container under env:. The manifest below intentionally leaves that section out so it does not claim undocumented settings.

How do you write the Iron Gallery manifest?

Save the following as iron-gallery.yaml. The gallery Deployment’s selector and Pod-template label are both run: iron-gallery; the database selector and template label are both db: mariadb. Kubernetes requires those selector/label pairs to agree. As the Kubernetes Deployment documentation puts it, “A Deployment manages a set of Pods to run an application workload, usually one that doesn’t maintain state.”

apiVersion: v1
kind: Namespace
metadata:
  name: iron-namespace-xfusion
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: iron-gallery-deployment-xfusion
  namespace: iron-namespace-xfusion
spec:
  replicas: 1
  selector:
    matchLabels:
      run: iron-gallery
  template:
    metadata:
      labels:
        run: iron-gallery
    spec:
      containers:
        - name: iron-gallery-container-xfusion
          image: kodekloud/irongallery:2.0
          resources:
            limits:
              memory: 100Mi
              cpu: 50m
          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-xfusion
  namespace: iron-namespace-xfusion
spec:
  replicas: 1
  selector:
    matchLabels:
      db: mariadb
  template:
    metadata:
      labels:
        db: mariadb
    spec:
      containers:
        - name: iron-db-container-xfusion
          image: kodekloud/irondb:2.0
          # Add the env entries required by your specific lab prompt here.
          volumeMounts:
            - name: db-data
              mountPath: /var/lib/mysql
      volumes:
        - name: db-data
          emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
  name: iron-db-service-xfusion
  namespace: iron-namespace-xfusion
spec:
  type: ClusterIP
  selector:
    db: mariadb
  ports:
    - protocol: TCP
      port: 3306
      targetPort: 3306
---
apiVersion: v1
kind: Service
metadata:
  name: iron-gallery-service-xfusion
  namespace: iron-namespace-xfusion
spec:
  type: NodePort
  selector:
    run: iron-gallery
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
      nodePort: 32678

The service names in this example are valid names chosen for the manifest. If the grading prompt specifies exact service names, retain those names while keeping the selectors and ports unchanged. The Deployment names, labels, image tags, mount paths, replica counts, limits, and requested NodePort above follow the cited Day 63 requirements.

How do you apply and inspect the resources?

Apply the file from the directory where you saved it:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
kubectl apply -f iron-gallery.yaml

Then inspect the namespace and all workload objects:

kubectl get namespace iron-namespace-xfusion
kubectl get deployments,pods,services -n iron-namespace-xfusion
kubectl get pods -n iron-namespace-xfusion -o wide

Wait for each Deployment to report its desired replica as available:

kubectl rollout status deployment/iron-gallery-deployment-xfusion -n iron-namespace-xfusion
kubectl rollout status deployment/iron-db-deployment-xfusion -n iron-namespace-xfusion

For a more detailed check, inspect selectors, events, mounts, and container state:

kubectl describe deployment iron-gallery-deployment-xfusion -n iron-namespace-xfusion
kubectl describe deployment iron-db-deployment-xfusion -n iron-namespace-xfusion
kubectl describe pod -l run=iron-gallery -n iron-namespace-xfusion
kubectl describe pod -l db=mariadb -n iron-namespace-xfusion
kubectl get service -n iron-namespace-xfusion

A walkthrough published for this challenge shows both Pods ready and a gallery service reported as 80:32678/TCP. Treat that as the author’s sample output, not as a result measured for this article. Your output can differ while still being correct if your cluster assigns different internal addresses or reports a different node address.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do you open the gallery?

The gallery Service is a NodePort, so request the gallery through a Kubernetes node address and port 32678:

kubectl get nodes -o wide

Use a reachable node IP in http://<node-ip>:32678. The exact address depends on how your lab exposes nodes. If the page does not load, first confirm that the gallery Pod is Ready and that the Service has an endpoint:

Also popular on Amazon
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
kubectl get endpoints iron-gallery-service-xfusion -n iron-namespace-xfusion
kubectl get pod -l run=iron-gallery -n iron-namespace-xfusion
kubectl logs deployment/iron-gallery-deployment-xfusion -n iron-namespace-xfusion

Seeing an installation page meets the initial exercise criterion. It does not prove that the gallery is configured to read from or write to MariaDB.

Why is the gallery a NodePort while the database is ClusterIP?

The two Services have different jobs. NodePort gives traffic entering a node a stable port that can reach the gallery; ClusterIP supplies an internal virtual IP for clients inside the cluster and is appropriate for keeping the database off the node-facing interface.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The default Kubernetes NodePort range is 30000–32767, so 32678 falls inside the documented default. A cluster administrator can configure another range, and the requested port must also be free. Kubernetes states: “If you want a specific port number, you can specify a value in the nodePort field. The control plane will either allocate you that port or report that the API transaction failed.” Read the Service documentation if the API rejects the Service.

The database Service listens on TCP 3306 and selects Pods carrying db: mariadb. The gallery Service listens on TCP 80, targets container port 80, and selects Pods carrying run: iron-gallery. A selector typo can leave a Service with no endpoints even though kubectl apply succeeds.

What does emptyDir mean for this lab?

An emptyDir is created when a Pod is assigned to a node. It is available to containers in that Pod, but it is not durable storage. Kubernetes’ volume documentation states: “When a Pod is removed from a node for any reason, the data in the emptyDir is deleted permanently.”

In this manifest, that means gallery uploads and configuration disappear when the gallery Pod is removed, and database files disappear when the database Pod is removed. A container restart inside the same Pod is a different event and does not by itself remove the Pod’s emptyDir; rescheduling or deleting the Pod does. For a real gallery, replace these volumes with an appropriate persistent-volume design and establish backups before storing valuable images or database records.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
Sale
BENFEI USB C Hub 5-in-1 with 4K HDMI(Certified), 100W Power Delivery, 3 USB-A, Silicone Cable, Aluminum Case Compatible with MacBook Pro/Air, iPad Pro, iMac, iPhone 15 Pro/Pro Max, XPS, Thinkpad
  • Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
  • Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
  • 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
  • 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
  • Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.

See the official Kubernetes Volumes documentation for the lifecycle details.

Does the frontend have to connect to MariaDB for Day 63?

No. The cited challenge explicitly treats an installation page as sufficient for the initial objective and does not require wiring the frontend to the database. That limitation is specific to the exercise, not a statement that a complete gallery application can operate indefinitely without database configuration.

If you continue beyond the lab, you will need the application’s documented database settings, credentials, and connection details. The supplied sources do not document those application-specific variables, so this guide does not guess them. Add the exact values supplied by your challenge or the image documentation, then verify connectivity from the application according to that documentation.

How do you troubleshoot common failures?

Symptom Likely cause What to check
kubectl apply rejects the NodePort 32678 is outside the cluster’s configured range or already allocated. Read the API error, inspect the cluster’s Service configuration, and use the exact port required by the lab only when it is available.
Deployment exists but no Pod is selected The selector and template labels differ. Compare spec.selector.matchLabels with spec.template.metadata.labels on the Deployment.
Service has no endpoints The Service selector does not match a Ready Pod. Run kubectl get pods --show-labels and compare labels with the Service selector.
Pod is Pending The scheduler cannot place it, or the cluster cannot pull the image. Run kubectl describe pod and read the Events section for the specific reason.
Database Pod repeatedly restarts Required image environment variables may be missing or incorrect. Use the variables from your exact lab prompt; do not substitute undocumented names.
Installation page loads but the app cannot use data The exercise does not configure frontend-to-database connectivity. Treat the page as the lab milestone and perform the separate application configuration step if required.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What is lab-specific and what is general Kubernetes practice?

The namespace, suffixes, image tags, one-replica counts, labels, limits, mount paths, and port numbers are challenge inputs. They should not be copied as universal sizing guidance. In particular, 50m CPU and 100Mi memory are the stated gallery limits for this exercise, not a capacity recommendation for a busy installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deployments, selectors, Services, NodePort allocation, and emptyDir lifecycle are general Kubernetes mechanisms. The official documentation explains that a Deployment provides declarative management of a set of Pods, while a Service provides a stable way to expose selected Pods. Keeping that distinction clear helps you adapt the lab without mistaking a teaching setup for a production architecture.

How do you clean up the lab?

Because every object is in one namespace, deleting the namespace removes the lab resources together:

Also popular on Amazon
𝟒𝐏𝐚𝐜𝐤 𝐔𝐩𝐠𝐫𝐚𝐝𝐞𝐝 USB to USB C Adapter,Type-C Female to A Male Charger Converter for iPhone 18 Charger,iWatch Ultra SE 9 10,iPhone 17 Pro Max 16 15 14,Samsung S25,AirPods,iPad,Car,Xbox
  • 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
  • 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
  • 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
  • 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
  • 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
kubectl delete namespace iron-namespace-xfusion

Do this only after collecting any logs or screenshots required by your exercise. Deleting the namespace also deletes the Pods and their emptyDir contents.

Frequently Asked Questions

Is NodePort 32678 guaranteed to work on every Kubernetes cluster?

No. It is inside Kubernetes’ commonly documented default range, but administrators can configure a different range and another Service may already hold that port. The API server reports the precise reason if the requested allocation fails.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Will an emptyDir survive a container restart?

Usually, a restart of a container inside the same Pod leaves the Pod volume in place. Removing the Pod, however, permanently removes its emptyDir data, so a replacement Pod will not see previous uploads or database files.

Can I use a persistent volume instead of emptyDir?

Yes, if you are extending the exercise for real data retention. The Day 63 specification calls for emptyDir, so changing the volume type may no longer match an automated grader; use persistent storage only in a separate production-oriented version.

Why does the manifest not include MariaDB environment variables?

The supplied Day 63 references mention required database variables but do not list their keys or values. Copy them verbatim from your specific challenge prompt or image documentation rather than guessing names that could prevent the database container from starting.

What should I do if my challenge uses a different suffix?

Replace -xfusion consistently in the namespace, Deployment names, Service names, and any commands. Do not mix a namespace or selector from one challenge variant with resource names from another.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of November 23, 2026 11:29 am GMT+0530.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.