Created
July 10, 2025 14:53
-
-
Save corbtastik/5c77562ad919f08a171f6f3f4d4a6849 to your computer and use it in GitHub Desktop.
Basic MongoDB enterprise deployment for Podman Kind installs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: mongodb | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: mongodb | |
namespace: mongodb | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: mongodb | |
template: | |
metadata: | |
labels: | |
app: mongodb | |
spec: | |
securityContext: | |
runAsUser: 0 | |
runAsGroup: 0 | |
containers: | |
- name: mongodb | |
image: mongodb/mongodb-enterprise-server:latest | |
ports: | |
- containerPort: 27017 | |
env: | |
- name: MONGODB_INITDB_ROOT_USERNAME | |
value: root | |
- name: MONGODB_INITDB_ROOT_PASSWORD | |
value: example | |
- name: ACCEPT_LICENSE | |
value: "yes" | |
volumeMounts: | |
- name: mongo-data | |
mountPath: /data/db | |
volumes: | |
- name: mongo-data | |
hostPath: | |
path: /data/kind/mongodb | |
type: DirectoryOrCreate | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mongodb | |
namespace: mongodb | |
spec: | |
type: ClusterIP | |
selector: | |
app: mongodb | |
ports: | |
- port: 27017 | |
targetPort: 27017 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment