Running a MongoDB Database in Kubernetes with StatefulSets




Create a new Cluster

Create the StorageClass

Deploying the Headless Service and StatefulSet

Scaling the MongoDB replica set

Running a MongoDB Database in Kubernetes with StatefulSets

1 ora 7 crediti


Google Cloud Self-Paced Labs


Kubernetes is an open source container orchestration tool that handles the complexities of running containerized applications. You can run Kubernetes applications with Kubernetes Engine—a Google Cloud computing service that offers many different customizations and integrations. In this lab, you will get some practical experience with Kubernetes by learning how to set up a MongoDB database with a StatefulSet. Running a stateful application (a database) on a stateless service (container) may sound contradictory. However, after getting hands-on practice with this lab you will quickly see how that's not the case. In fact, by using a few open-source tools you will see how Kubernetes and stateless services can go hand-in-hand.

What you'll learn

In this lab, you will learn the following:

  • How to deploy a Kubernetes cluster, a headless service, and a StatefulSet.

  • How to connect a Kubernetes cluster to a MongoDB replica set.

  • How to scale MongoDB replica set instances up and down.

  • How to clean up your environment and shutdown the above services.

Crea un account Qwiklabs per leggere il resto del lab e tanto altro ancora.

  • Acquisisci accesso temporaneo a Google Cloud Console.
  • Oltre 200 lab dal livello iniziale a quelli più avanzati.
  • Corsi brevi per apprendere secondo i tuoi ritmi.
Crea un account per iniziare questo lab