From Containers to Kubernetes with Node.js

376.2k views

In this series, you will build and containerize a Node.js application with a MongoDB database. The series is designed to introduce you to the fundamentals of migrating an application to Kubernetes, including modernizing your app using the 12FA methodology, containerizing it, and deploying it to Kubernetes. The series also includes information on deploying your app with Docker Compose using an Nginx reverse proxy and Let’s Encrypt.

  • Interested in Node.js but not sure where to start with Docker? This tutorial will walk you through the first step: building an image for a Node.js application and creating a container from it. We will also walk you through pushing that image to Docker Hub and using the saved image to recreate your application container.
  • In the process of working with Node.js, you may find yourself developing a project that stores and queries data. This tutorial will show you how to integrate MongoDB with an existing Node application. This process will involve adding user and database information to your application code and using the Object Document Mapper Mongoose. At the end of the tutorial, you will have a working application that will take a user's input and display it in the browser.
  • If you are actively developing an application, Docker can simplify your workflow and the process of deploying your application to production. This tutorial will show you how to set up a development environment for a Node.js application using Docker. You will create two containers — one for the Node application and another for the MongoDB database — with Docker Compose. At the end of this tutorial, you will have a working shark information application running on Docker containers.
  • This tutorial will show you how to migrate your Docker Compose workflow to Kubernetes using kompose. You will start by creating a single-instance setup for a Node.js application with a MongoDB database on a Kubernetes cluster. You will then scale this setup to include multiple replicas of your application and database.
  • Kubernetes is a system for running modern, containerized applications at scale. With it, developers can deploy and manage containerized applications across clusters of machines. When creating multi-service deployments with Kubernetes, many developers opt to use the Helm package manager. In this tutorial, you will deploy a replicated Node.js application with a MongoDB database using Helm charts, which will be a good starting point for building other resilient and fault-tolerant applications.
  • Secure your containerized Node.js application by following this tutorial, which shows you how to deploy a Node.js application with an Nginx reverse proxy using Docker Compose. You will obtain certificates for your application domain with Let's Encrypt and ensure that your application receives a high security rating.