Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

YAML configurations for deploying MongoDB on Kubernetes, featuring a Deployment for pod management, Secrets for secure credentials, and a Service for database connectivity.

License

Notifications You must be signed in to change notification settings

Jayasurya5454/Mongodb-Server-Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB Deployment on Kubernetes

This repository contains YAML files to deploy MongoDB on a Kubernetes cluster with a Deployment, Secrets, and Service.

Features

  • Deployment: Single MongoDB pod exposing port 27017 with credentials from a Secret.
  • Headless Service: Enables pod-to-pod communication using clusterIP: None.
  • Secrets: Stores base64-encoded MongoDB credentials securely.

Files

  • mongodb-deployment.yaml: Defines the Deployment and Service.
  • mongodb-secret.yaml: Contains Secrets with credentials.
  • mongodb-service.yaml: Defines the Service for MongoDB.

Prerequisites

  • Kubernetes cluster (e.g., Minikube, GKE, EKS).
  • kubectl CLI configured.

Usage

  1. Apply Secrets:
    kubectl apply -f mongodb-secret.yaml
  2. Deploy MongoDB:
    kubectl apply -f mongodb-deployment.yaml
  3. Apply Service:
    kubectl apply -f mongodb-service.yaml
  4. Verify:
    kubectl get pods

Cleanup

Delete resources:

kubectl delete -f mongodb-deployment.yaml
kubectl delete -f mongodb-secret.yaml
kubectl delete -f mongodb-service.yaml

About

YAML configurations for deploying MongoDB on Kubernetes, featuring a Deployment for pod management, Secrets for secure credentials, and a Service for database connectivity.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published