Kubernetes mongo Installation

  1. persistence volume
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mongodb-sit-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 40G
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: sit-ml-mongo
spec:
replicas: 1
selector:
matchLabels:
app: sit-ml-mongo
serviceName: sit-ml-mongo
template:
metadata:
labels:
app: sit-ml-mongo
spec:
nodeSelector:
purpose: ml_database
environment: ml_sit
volumes:
- name: data
persistentVolumeClaim:
claimName: mongodb-sit-claim
containers:
- command:
- numactl
- --interleave=all
- mongod
- --bind_ip
- 0.0.0.0
- --auth
- --setParameter
- authenticationMechanisms=SCRAM-SHA-1
- --wiredTigerCacheSizeGB
- "0.25"
image: mongo:4.4
imagePullPolicy: IfNotPresent
name: mongo
ports:
- containerPort: 27017
protocol: TCP
resources:
limits:
cpu: "2"
memory: 7G
requests:
cpu: "0.5"
memory: 2G
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db
name: data
restartPolicy: Always
volumeMounts:
- mountPath: /data/db
name: data

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Tutorial: How to Join the HALO Community to Earn Passive HO Rewards (MetaMask Desktop Version)

Rapidly Document Authorship with VS Code Snippets

Download Os X Install Dmg

How to Include Third-Party Developers as Creative Problem-Solvers

Announcement: Hashpay Wallet v3.0.8 Update

[RH294] Expert session: Industry Use Case on Automation Using Ansible

Run Length Encoding. Learn the Brute force approach

Under the Hood: Building a MAV/PX4 Ground Control Station with Tangram Maker

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
wahyu eko hadi saputro

wahyu eko hadi saputro

i am a reader

More from Medium

Setup HashiCorp Vault on docker

Graylog Dashboard for Nginx Logs

Docker Multi-Stage builds

Configure WSO2 Identity Server for Self Service Authorization using Admin REST APIs