initial commit
This commit is contained in:
5
lp/mongodb/README.md
Executable file
5
lp/mongodb/README.md
Executable file
@@ -0,0 +1,5 @@
|
||||
# kubernetes mongodb Manifest YAML's
|
||||
|
||||
Kubernetes manifests for mongoDB Deployment.
|
||||
|
||||
Full Documentation: Refer https://devopscube.com/deploy-mongodb-kubernetes/ for step by step process to use these manifests.
|
||||
11
lp/mongodb/catalog-info.yaml
Normal file
11
lp/mongodb/catalog-info.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: backstage.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: lp-mongodb
|
||||
title: Mongodb (lp)
|
||||
spec:
|
||||
type: service
|
||||
lifecycle: production
|
||||
owner: platform-team
|
||||
partOf:
|
||||
- ../catalog-info.yaml
|
||||
21
lp/mongodb/ingressroute.yaml
Executable file
21
lp/mongodb/ingressroute.yaml
Executable file
@@ -0,0 +1,21 @@
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: mongodb-express-tls
|
||||
namespace: mongodb
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`mongodb-lp.allarddcs.nl`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: mongo-express
|
||||
port: 8081
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
47
lp/mongodb/mongo-express.yaml
Executable file
47
lp/mongodb/mongo-express.yaml
Executable file
@@ -0,0 +1,47 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mongodb-express
|
||||
namespace: mongodb
|
||||
labels:
|
||||
app: mongo-express
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mongo-express
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongo-express
|
||||
spec:
|
||||
containers:
|
||||
- name: mongo-express
|
||||
image: mongo-express
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
env:
|
||||
- name: ME_CONFIG_OPTIONS_EDITORTHEME
|
||||
value: "ambiance"
|
||||
- name: ME_CONFIG_MONGODB_SERVER
|
||||
value: mongodb
|
||||
- name: ME_CONFIG_BASICAUTH_USERNAME
|
||||
value: "admin"
|
||||
- name: ME_CONFIG_BASICAUTH_PASSWORD
|
||||
value: "Mongodb01"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongo-express
|
||||
namespace: mongodb
|
||||
labels:
|
||||
name: mongo-express
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 8081
|
||||
name: http
|
||||
selector:
|
||||
app: mongo-express
|
||||
|
||||
86
lp/mongodb/mongodb.yaml
Executable file
86
lp/mongodb/mongodb.yaml
Executable file
@@ -0,0 +1,86 @@
|
||||
apiVersion: apps/v1
|
||||
kind: ReplicaSet
|
||||
metadata:
|
||||
labels:
|
||||
app: mongodb
|
||||
name: mongodb
|
||||
namespace: mongodb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mongodb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongodb
|
||||
spec:
|
||||
containers:
|
||||
- image: mongodb/mongodb-community-server
|
||||
name: mongodb
|
||||
# args: ["--dbpath","/data/db"]
|
||||
env:
|
||||
- name: MONGO_INITDB_ROOT_USERNAME
|
||||
value: admin
|
||||
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||
value: Mongodb01
|
||||
volumeMounts:
|
||||
- name: "mongo-data-dir"
|
||||
mountPath: "/data/db"
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: amd64
|
||||
volumes:
|
||||
- name: "mongo-data-dir"
|
||||
persistentVolumeClaim:
|
||||
claimName: "mongo-data"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: mongodb
|
||||
name: mongodb
|
||||
namespace: mongodb
|
||||
spec:
|
||||
ports:
|
||||
- port: 27017
|
||||
protocol: TCP
|
||||
targetPort: 27017
|
||||
selector:
|
||||
app: mongodb
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mongo-data-pv
|
||||
spec:
|
||||
storageClassName: ""
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
mountOptions:
|
||||
- hard
|
||||
- nfsvers=4.1
|
||||
nfs:
|
||||
server: 192.168.2.110
|
||||
path: /mnt/nfs_share/mongodb
|
||||
readOnly: false
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mongo-data
|
||||
namespace: mongodb
|
||||
spec:
|
||||
storageClassName: ""
|
||||
volumeName: mongo-data-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
Reference in New Issue
Block a user