InventarioITU runs on Kubernetes to gain production-grade scheduling, self-healing, and declarative configuration management. The local development cluster is powered by Minikube, and the cluster uses the Calico CNI (Container Network Interface) plugin rather than the default Minikube CNI. Calico is required because InventarioITU enforces KubernetesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/carlamndz/InventarioITU/llms.txt
Use this file to discover all available pages before exploring further.
NetworkPolicy objects to restrict inter-pod traffic — the default Minikube networking layer silently ignores these policies. Kubernetes manifests should be placed under the k8s/ directory, organized by service as described in the Manifest Structure section below.
Prerequisites
Before deploying, make sure the following tools are installed and available on yourPATH:
- Minikube v1.30 or later — installation guide
- kubectl — installation guide
- Docker — required as the Minikube container runtime
Deployment Steps
Start Minikube with Calico CNI
Launch a Minikube cluster and instruct it to use Calico as the network plugin. The This step takes a few minutes on first run while Minikube downloads the node image and Calico pulls its controller and node images.
--network-plugin=cni flag disables the default Kindnet plugin, and --cni=calico tells Minikube to install Calico automatically.Verify Calico is Running
Confirm that the Calico pods in the You should see at least a
kube-system namespace reached Running status before applying application manifests. Applying NetworkPolicy resources before Calico is ready means the policies will not be enforced immediately.calico-kube-controllers pod and one calico-node pod, both with status Running.Apply All Manifests
Once you have added your manifest files to the If you want to apply a single subdirectory (for example, only the frontend), once you have added manifests to
k8s/ subdirectories, apply the entire directory recursively. kubectl processes every .yaml file it finds, creating Deployments, StatefulSets, Services, and NetworkPolicies in dependency order as Kubernetes resolves them.k8s/frontend/:Check Pod Status
Watch all pods come up. StatefulSets for SQL Server and MongoDB may take 30–60 seconds to initialize their storage and start accepting connections.All pods should eventually show
Running with 1/1 containers ready. If a pod is stuck in CrashLoopBackOff or Init:Error, inspect its logs immediately (see the tip below).Expose the Web Frontend
Minikube provides a convenience command to retrieve the external URL for a The command prints a URL such as
NodePort service. This opens a tunnel from your host machine to the inventario-web service inside the cluster.http://192.168.49.2:31234. Open it in a browser to reach the InventarioITU interface.Manifest Structure
All Kubernetes manifests are organized underk8s/ with one subdirectory per service. This keeps each component’s configuration self-contained and makes it straightforward to update or delete a single service without touching others.
| Directory | Contents |
|---|---|
k8s/frontend/ | Deployment and Service for inventario-web (Node.js app, port 3000) |
k8s/sqlserver/ | StatefulSet and Service for ubicacion-db (SQL Server 2022 or MySQL, port 1433) |
k8s/mongodb/ | StatefulSet and Service for inventario-db (MongoDB 7, port 27017) |
k8s/ldap/ | Deployment and Service for ldap-service (OpenLDAP, port 389) |
k8s/network-policies/ | Calico NetworkPolicy manifests controlling which pods may communicate |
StatefulSet instead of Deployment because they require stable network identities and persistent storage. The frontend and LDAP service use standard Deployment objects since they are stateless.
Example Service Manifest
The following example manifest exposesinventario-web as a NodePort service, which makes the web application reachable from outside the cluster through Minikube’s node IP. Save it to k8s/frontend/service.yaml once you are ready to deploy. The selector must match the app label defined on the corresponding Deployment’s pod template.
port field is the port the Service listens on inside the cluster. The targetPort is the port the container exposes — matching the EXPOSE 3000 instruction in your app/Dockerfile. Kubernetes assigns a random high port (30000–32767) on the node, which minikube service inventario-web --url resolves for you.
SQL Server (or MySQL) and MongoDB store their data on disk. In Kubernetes, container filesystems are ephemeral — data is lost when a pod is deleted unless a PersistentVolumeClaim (PVC) is attached. When you create the StatefulSet manifests in
k8s/sqlserver/ and k8s/mongodb/, include a volumeClaimTemplates section to automatically provision a PVC backed by Minikube’s default hostPath storage class. In a production cluster, replace the storage class with a network-backed option (e.g., AWS EBS, Azure Disk, or Ceph) to ensure data durability across node restarts.