Diving into Kubernetes-3: Running a MongoDB and Nodejs App together in the Kubernetes cluster Using PV-PVC and ClusterIP-NodePort.

In this article, we will learn about Kubernetes Volume and Networking, which are important topics of Kubernetes, and we will make a practical example of them. We will create a Kubernetes cluster, and then run the MongoDB Database service and a web application written in Nodejs in this cluster. We will meet the storage needs of the database by matching PVCs (PersistentVolumeClaims) and PVs (Persistent Volumes). For the database, we will set the service type as ClusterIP, and for our web application, we will set the service type as NodePort. Thus, by opening port 3001, we will enable it to respond to customer requests through port 3001 of the web application. We will test whether our database and application are working by connecting to them. We will do them practically and step by step.

Cumhur Akkaya
10 min readDec 18, 2023

--

--

Cumhur Akkaya

✦ Multi-Cloud & DevOps Engineer, ✦Technical Writer, ✦AWS Community Builder, ✦LinkedInTop Voice, ✦Believes in learning by doing, ✦ linkedin.com/in/cumhurakkaya