SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Running MongoDB Enterprise
Database Services on
Kubernetes
At your MongoDB.local, you’ll learn technologies, tools, and best practices that make it easy for you to build
data-driven applications without distraction.
Modified
url 7 secs ago
ptx 8 mins ago
ptx 9/12/2018 9:58 am
Jason
Mimick
Technical Director, MongoDB
@jmimick
jasonmimick
Agenda
Kubernetes & MongoDB Target Architecture
Demo: installing the MongoDB Operator & Running a replica set
Advanced configurations
Accessing MongoDB services
Release plans: Target GA, Additional Features, OpenShift 3.11
Technologies -
Containers
A standardized unit of software
lightweight, standalone, executable
package of software that includes
everything needed to run an application:
code, runtime, system tools, system
libraries and settings
(https://www.docker.com/resources/what-container)
Technologies -
Kubernetes
Kubernetes is an open-source
system for automating deployment,
scaling, and management of
containerized applications.
(https://kubernetes.io/)
Important Concepts: Master Node, Worker Nodes,
Pods, Image Repo, API
Requirement: >= v1.9
Technologies -
MongoDB Ops
Manager
Ops Manager is a package for
managing MongoDB
deployments.
Management (Automation)
Monitoring
Backups
Cloud Manager
Technologies -
Kubernetes
Operators
An Operator is a method of packaging, deploying
and managing a Kubernetes application. A
Kubernetes application is an application that is
both deployed on Kubernetes and managed using
the Kubernetes APIs and kubectl tooling..
https://www.docker.com/resources/what-container
Kubernetes
MongoDB Ops
Manager
Operator
Architecture
Part 2 - Using the Operator
Getting the operator
Official container images
hosted on quay.io
Public GitHub repository
https://github.com/mongodb/mongodb-enterprise-kub
ernetes
Demo
Installing the Operator
Spin up k8s & install operator
# Start cluster
minikube start
# Install operator
kubectl create -f ./mongodb-enterprise.yaml
# set default namespace (op creates & installs to 'mongodb')
kubectl config set-context $(kubectl config current-context)
--namespace=mongodb
# See all operator stuff
kubectl get all --selector=app=mongodb-enterprise-operator
https://docs.opsmanager.mongodb.com/current/tutorial/install-k8s-operator/
Configuration - Connection to Ops
Manager
---
apiVersion: v1
kind: ConfigMap
metadata:
name: dot-local
data:
projectId:
5b76d1750bd66b7ea136427f
baseUrl:
https://cloud.mongodb.com/
---
apiVersion: v1
kind: Secret
metadata:
name: opsmgr-credentials
stringData:
user: jason.mimick
publicApiKey:
02b9674b-e912-4bf5-bec3-43687
832a6cd
Create Secret & ConfigMap
kubectl create -f opsmgr-credentials.yaml
kubectl create -f dot-local-opsmgr-project.yaml
kubectl get configmaps,secrets
Demo
Deploying a MongoDB
Replica Set
Deploying a Replica Set
apiVersion: mongodb.com/v1
kind: MongoDbReplicaSet
metadata:
name: chicago-rs1
namespace: mongodb
spec:
members: 3
version: 4.0.0
project: dot-local
credentials: opsmgr-credentials
podSpec:
storageClass: standard
kubectl create -f chicago-rs1.yaml
kubectl get all --selector=app=chicago-rs1-svc
NAME READY STATUS RESTARTS AGE
pod/chicago-rs1-0 1/1 Running 12 13h
pod/chicago-rs1-1 1/1 Running 12 13h
pod/chicago-rs1-2 1/1 Running 12 13h
NAME TYPE CLUSTER-IP EXTERNAL-IP
PORT(S) AGE
service/chicago-rs1-svc ClusterIP None <none>
27017/TCP 13h
service/chicago-rs1-svc-external NodePort 10.102.95.40 <none>
27017:30780/TCP 13h
NAME DESIRED CURRENT AGE
statefulset.apps/chicago-rs1 3 3 13h
High Availability - replication + statefulset =
kubectl delete pod chicago-rs1-1
pod "chicago-rs1-1" deleted
root@ip-172-31-19-43:~# kubectl get all --selector=app=chicago-rs1-svc
NAME READY STATUS RESTARTS AGE
pod/chicago-rs1-0 1/1 Running 12 13h
pod/chicago-rs1-1 1/1 Running 0 1m
pod/chicago-rs1-2 1/1 Running 12 13h
NAME TYPE CLUSTER-IP EXTERNAL-IP
PORT(S) AGE
service/chicago-rs1-svc ClusterIP None <none>
27017/TCP 13h
service/chicago-rs1-svc-external NodePort 10.102.95.40 <none>
27017:30780/TCP 13h
NAME DESIRED CURRENT AGE
statefulset.apps/chicago-rs1 3 3 13h
Scaling
# vim chicago-rs1.yaml
# kubectl apply -f chicago-rs1.yaml
mongodbreplicaset.mongodb.com/chicago-rs1 configured
# kubectl get all --selector=app=chicago-rs1-svc
NAME READY STATUS RESTARTS AGE
pod/chicago-rs1-0 1/1 Running 12 13h
pod/chicago-rs1-1 1/1 Running 0 3m
pod/chicago-rs1-2 1/1 Running 12 13h
pod/chicago-rs1-3 1/1 Running 0 10s
NAME TYPE CLUSTER-IP EXTERNAL-IP
PORT(S) AGE
service/chicago-rs1-svc ClusterIP None <none>
27017/TCP 13h
service/chicago-rs1-svc-external NodePort 10.102.95.40 <none>
27017:30780/TCP 13h
NAME DESIRED CURRENT AGE
statefulset.apps/chicago-rs1 4 4 13h
Part 2 - Advanced Configuration
Resource requests
memory, cpu
Persistent Storage - DB right?
apiVersion: mongodb.com/v1
kind: MongoDbReplicaSet
metadata:
name: chicago-rs1
namespace: mongodb
spec:
members: 3
version: 4.0.0
project: dotlocal-chicago
credentials: opsmgr-credentials
podSpec:
storage: 5G
storageClass: managed-premium
Persistent Storage - What's
createdkubectl get sc,pv,pvc 
--output=custom-columns=KIND:.kind,NAME:.metadata.name,STATUS:.status.phas
e
KIND NAME STATUS
StorageClass default <none>
StorageClass managed-premium <none>
PersistentVolume pvc-2428e963-b5ff-11e8-bef4-0a58ac1f12f3 Bound
PersistentVolume pvc-877ac893-b5ff-11e8-bef4-0a58ac1f12f3 Bound
PersistentVolume pvc-c8993a87-b5ff-11e8-bef4-0a58ac1f12f3 Bound
PersistentVolumeClaim data-chicago-rs1-0 Bound
PersistentVolumeClaim data-chicago-rs1-1 Bound
PersistentVolumeClaim data-chicago-rs1-2 Bound
Node Affinity & Anti-Affinity
---
apiVersion: mongodb.com/v1
kind: MongoDbReplicaSet
metadata:
name: chicago-rs1-happy-nodes
namespace: mongodb
spec:
members: 3
version: 4.0.0
project: dotlocal-chicago
credentials: opsmgr-credentials
podSpec:
storage: 5G
storageClass: managed-premium
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: mood
operator: In
values:
- happy
Node Affinity & Anti-Affinity
[ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$ kubectl describe node aks-nodepool1-21637950-{0,1,2} | grep -E
"^Name:|mood"
Name: aks-nodepool1-21637950-0
mood=happy
Name: aks-nodepool1-21637950-1
mood=happy
Name: aks-nodepool1-21637950-2
mood=content
[ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$ kubectl describe node aks-nodepool1-21637950-{0,1,2} | grep -E
"^ mongodb|^Name:"
Name: aks-nodepool1-21637950-0
mongodb chicago-rs1-2 0 (0%) 0 (0%) 0 (0%) 0
(0%)
mongodb chicago-rs1-happy-2 0 (0%) 0 (0%) 0 (0%) 0
(0%)
mongodb chicago-rs1-happy-nodes-0 0 (0%) 0 (0%) 0 (0%) 0
(0%)
mongodb chicago-rs1-happy-nodes-2 0 (0%) 0 (0%) 0 (0%) 0
(0%)
mongodb mongodb-enterprise-operator-57bdc5c59f-lq6gt 0 (0%) 0 (0%) 0 (0%) 0
(0%)
Name: aks-nodepool1-21637950-1
mongodb chicago-rs1-0 0 (0%) 0 (0%) 0 (0%) 0 (0%)
mongodb chicago-rs1-happy-0 0 (0%) 0 (0%) 0 (0%) 0 (0%)
mongodb chicago-rs1-happy-nodes-1 0 (0%) 0 (0%) 0 (0%) 0 (0%)
Name: aks-nodepool1-21637950-2
mongodb chicago-rs1-1 0 (0%) 0 (0%) 0 (0%) 0 (0%)
mongodb chicago-rs1-happy-1 0 (0%) 0 (0%) 0 (0%) 0 (0%)
[ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$ ^C
Demo
Connecting to your MongoDB
deployment
intra-k8s cluster connections
1. Jump into cluster: kubectl exec -it chicago-rs1-0 -- /bin/bash
2. Find mongo binaries - run shell
ps -ef | grep mongo
/var/lib/mongodb-mms-automation/mongodb-linux-x86_64-4.0.0/bin/mon
go
"mongodb://chicago-rs1-0.chicago-rs1-svc.mongodb.svc.cluster.local
,chicago-rs1-1.chicago-rs1-svc.mongodb.svc.cluster.local,chicago-r
s1-2.chicago-rs1-svc.mongodb.svc.cluster.local/?replicaSet=chicago
-rs1"
mongodb+srv://
#!/bin/bash
: ${1?"Usage: $0 <MongoDB Service Name>"}
POD_STATE_WAIT_SECONDS=5
SERVICE=$1
DNS_SRV_POD="mongodb-${SERVICE}-dns-srv-test"
SIMPLE_CONNECTION_POD="mongodb-${SERVICE}-connection-test"
echo "MongoDB Enterprise Kubernetes - DNS SRV Connection Test - START"
echo "Testing service '${SERVICE}'"
echo "DNS SRV pod '${DNS_SRV_POD}'"
echo "Connection test pod '${SIMPLE_CONNECTION_POD}'"
kubectl run ${DNS_SRV_POD} --restart=Never --image=tutum/dnsutils -- host -t srv ${SERVICE}
STATE=""
while [ "${STATE}" != "Terminated" ]
do
STATE=$(kubectl describe pod ${DNS_SRV_POD} | grep "State:" | cut -d":" -f2 | tr -d '[:space:]')
if [ "${STATE}" = "Terminated" ]; then break; fi
echo "Polling state for pod '${DNS_SRV_POD}': ${STATE} ...sleeping ${POD_STATE_WAIT_SECONDS}"
sleep ${POD_STATE_WAIT_SECONDS}
done
kubectl logs ${DNS_SRV_POD}
SRV_HOST=$(kubectl logs ${DNS_SRV_POD} | cut -d' ' -f1 | head -1)
echo "Found SRV hostname: '${SRV_HOST}'"
kubectl run ${SIMPLE_CONNECTION_POD} --restart=Never --image=jmimick/simple-mongodb-connection-tester "${SRV_HOST}"
STATE=""
while [ "${STATE}" != "Terminated" ]
do
STATE=$(kubectl describe pod ${SIMPLE_CONNECTION_POD} | grep "State:" | cut -d":" -f2 | tr -d '[:space:]')
if [ "${STATE}" = "Terminated" ]; then break; fi
echo "Polling state for pod '${SIMPLE_CONNECTION_POD}': ${STATE} ...sleeping ${POD_STATE_WAIT_SECONDS}"
sleep ${POD_STATE_WAIT_SECONDS}
done
kubectl logs ${SIMPLE_CONNECTION_POD} | head
echo "...truncating logs, 100 documents should've been inserted..."
kubectl logs ${SIMPLE_CONNECTION_POD} | tail
kubectl delete pod ${DNS_SRV_POD}
kubectl delete pod ${SIMPLE_CONNECTION_POD}
./connection-srv-demo.sh chicago-rs1-svc
MongoDB Enterprise Kubernetes - DNS SRV Connection Test - START
Testing service 'chicago-rs1-svc'
DNS SRV pod 'mongodb-chicago-rs1-svc-dns-srv-test'
Connection test pod 'mongodb-chicago-rs1-svc-connection-test'
pod/mongodb-chicago-rs1-svc-dns-srv-test created
Polling state for pod 'mongodb-chicago-rs1-svc-dns-srv-test': Waiting ...sleeping 5
chicago-rs1-svc.mongodb.svc.cluster.local has SRV record 10 33 0
chicago-rs1-0.chicago-rs1-svc.mongodb.svc.cluster.local.
chicago-rs1-svc.mongodb.svc.cluster.local has SRV record 10 33 0
chicago-rs1-1.chicago-rs1-svc.mongodb.svc.cluster.local.
chicago-rs1-svc.mongodb.svc.cluster.local has SRV record 10 33 0
chicago-rs1-2.chicago-rs1-svc.mongodb.svc.cluster.local.
Found SRV hostname: 'chicago-rs1-svc.mongodb.svc.cluster.local'
pod/mongodb-chicago-rs1-svc-connection-test created
Polling state for pod 'mongodb-chicago-rs1-svc-connection-test': Waiting ...sleeping 5
simple-connection-test: testing connection to chicago-rs1-svc.mongodb.svc.cluster.local
Creating and reading 100 docs in the 'test-6b676382.foo' namespace
Database(MongoClient(host=['chicago-rs1-svc.mongodb.svc.cluster.local:27017'], document_class=dict,
tz_aware=False, connect=True), u'test-6b676382')
{u'i': 0, u'_id': ObjectId('5b98992c62b04e00014b7d5a')}
{u'i': 1, u'_id': ObjectId('5b98992d62b04e00014b7d5b')}
{u'i': 2, u'_id': ObjectId('5b98992d62b04e00014b7d5c')}
...truncating logs, 100 documents should've been inserted...
{u'i': 97, u'_id': ObjectId('5b98992d62b04e00014b7dbb')}
{u'i': 98, u'_id': ObjectId('5b98992d62b04e00014b7dbc')}
{u'i': 99, u'_id': ObjectId('5b98992d62b04e00014b7dbd')}
Dropped db 'test-6b676382'
pod "mongodb-chicago-rs1-svc-dns-srv-test" deleted
pod "mongodb-chicago-rs1-svc-connection-test" deleted
[ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$
Part 3 - Release plans & coming
features
Roadmap
Additional Features
Release Plans
SSL/TLS
Authentication
Enabling Backups
Running Ops Manager inside Kubernetes
Beta now - target Q1 2019 for GA
https://docs.opsmanager.mongodb.com/cu
rrent/reference/known-issues-k8s-beta/
OpenShift 3.11
Community Resources
Where to get involved and learn more
Github: https://github.com/mongodb/mongodb-enterprise-kubernetes
Slack: https://launchpass.com/mongo-db #enterprise-kubernetes
Talk to me!

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
 
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
Canary Releases on Kubernetes with Spinnaker, Istio, & Prometheus (2020)
 
Enabling ceph-mgr to control Ceph services via Kubernetes
Enabling ceph-mgr to control Ceph services via KubernetesEnabling ceph-mgr to control Ceph services via Kubernetes
Enabling ceph-mgr to control Ceph services via Kubernetes
 
Securing and Automating Kubernetes with Kyverno
Securing and Automating Kubernetes with KyvernoSecuring and Automating Kubernetes with Kyverno
Securing and Automating Kubernetes with Kyverno
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
 
Introduction to Kubernetes RBAC
Introduction to Kubernetes RBACIntroduction to Kubernetes RBAC
Introduction to Kubernetes RBAC
 
Helm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesHelm - Package Manager for Kubernetes
Helm - Package Manager for Kubernetes
 
Architecture of Cisco Container Platform: A new Enterprise Multi-Cloud Kubern...
Architecture of Cisco Container Platform: A new Enterprise Multi-Cloud Kubern...Architecture of Cisco Container Platform: A new Enterprise Multi-Cloud Kubern...
Architecture of Cisco Container Platform: A new Enterprise Multi-Cloud Kubern...
 
12 Factor App
12 Factor App12 Factor App
12 Factor App
 
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep DiveKubecon US 2019: Kubernetes Multitenancy WG Deep Dive
Kubecon US 2019: Kubernetes Multitenancy WG Deep Dive
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 
From Code to Kubernetes
From Code to KubernetesFrom Code to Kubernetes
From Code to Kubernetes
 
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an EnterpriseKubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
KubeCon EU 2016: ITNW (If This Now What): Orchestrating an Enterprise
 
Running I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati ShalomRunning I/O intensive workloads on Kubernetes, by Nati Shalom
Running I/O intensive workloads on Kubernetes, by Nati Shalom
 
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Kubernetes and Istio
Kubernetes and IstioKubernetes and Istio
Kubernetes and Istio
 
Cloud Native Development
Cloud Native DevelopmentCloud Native Development
Cloud Native Development
 
Managing kubernetes deployment with operators
Managing kubernetes deployment with operatorsManaging kubernetes deployment with operators
Managing kubernetes deployment with operators
 

Semelhante a MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes

Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 

Semelhante a MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes (20)

Running MongoDB Enterprise on Kubernetes
Running MongoDB Enterprise on KubernetesRunning MongoDB Enterprise on Kubernetes
Running MongoDB Enterprise on Kubernetes
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - Mediafly
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...
TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...
TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...
 
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
Sandboxing WebKitGTK (GUADEC 2019)
Sandboxing WebKitGTK (GUADEC 2019)Sandboxing WebKitGTK (GUADEC 2019)
Sandboxing WebKitGTK (GUADEC 2019)
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloud
 
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e JavaCome costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 Presentation
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, KyivKubernetes Navigation Stories – DevOpsStage 2019, Kyiv
Kubernetes Navigation Stories – DevOpsStage 2019, Kyiv
 
使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster 使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster
 
DCEU 18: Docker Container Networking
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes MeetupMetal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
Metal-k8s presentation by Julien Girardin @ Paris Kubernetes Meetup
 

Mais de MongoDB

Mais de MongoDB (20)

MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDBMongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series DataMongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your MindsetMongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas JumpstartMongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep DiveMongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & GolangMongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

MongoDB.local Austin 2018: MongoDB Ops Manager + Kubernetes

  • 1. Running MongoDB Enterprise Database Services on Kubernetes At your MongoDB.local, you’ll learn technologies, tools, and best practices that make it easy for you to build data-driven applications without distraction. Modified url 7 secs ago ptx 8 mins ago ptx 9/12/2018 9:58 am
  • 3. Agenda Kubernetes & MongoDB Target Architecture Demo: installing the MongoDB Operator & Running a replica set Advanced configurations Accessing MongoDB services Release plans: Target GA, Additional Features, OpenShift 3.11
  • 4. Technologies - Containers A standardized unit of software lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings (https://www.docker.com/resources/what-container)
  • 5. Technologies - Kubernetes Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. (https://kubernetes.io/) Important Concepts: Master Node, Worker Nodes, Pods, Image Repo, API Requirement: >= v1.9
  • 6. Technologies - MongoDB Ops Manager Ops Manager is a package for managing MongoDB deployments. Management (Automation) Monitoring Backups Cloud Manager
  • 7. Technologies - Kubernetes Operators An Operator is a method of packaging, deploying and managing a Kubernetes application. A Kubernetes application is an application that is both deployed on Kubernetes and managed using the Kubernetes APIs and kubectl tooling.. https://www.docker.com/resources/what-container Kubernetes MongoDB Ops Manager Operator
  • 9. Part 2 - Using the Operator
  • 10. Getting the operator Official container images hosted on quay.io Public GitHub repository https://github.com/mongodb/mongodb-enterprise-kub ernetes
  • 12. Spin up k8s & install operator # Start cluster minikube start # Install operator kubectl create -f ./mongodb-enterprise.yaml # set default namespace (op creates & installs to 'mongodb') kubectl config set-context $(kubectl config current-context) --namespace=mongodb # See all operator stuff kubectl get all --selector=app=mongodb-enterprise-operator https://docs.opsmanager.mongodb.com/current/tutorial/install-k8s-operator/
  • 13. Configuration - Connection to Ops Manager --- apiVersion: v1 kind: ConfigMap metadata: name: dot-local data: projectId: 5b76d1750bd66b7ea136427f baseUrl: https://cloud.mongodb.com/ --- apiVersion: v1 kind: Secret metadata: name: opsmgr-credentials stringData: user: jason.mimick publicApiKey: 02b9674b-e912-4bf5-bec3-43687 832a6cd
  • 14. Create Secret & ConfigMap kubectl create -f opsmgr-credentials.yaml kubectl create -f dot-local-opsmgr-project.yaml kubectl get configmaps,secrets
  • 16. Deploying a Replica Set apiVersion: mongodb.com/v1 kind: MongoDbReplicaSet metadata: name: chicago-rs1 namespace: mongodb spec: members: 3 version: 4.0.0 project: dot-local credentials: opsmgr-credentials podSpec: storageClass: standard
  • 17. kubectl create -f chicago-rs1.yaml kubectl get all --selector=app=chicago-rs1-svc NAME READY STATUS RESTARTS AGE pod/chicago-rs1-0 1/1 Running 12 13h pod/chicago-rs1-1 1/1 Running 12 13h pod/chicago-rs1-2 1/1 Running 12 13h NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/chicago-rs1-svc ClusterIP None <none> 27017/TCP 13h service/chicago-rs1-svc-external NodePort 10.102.95.40 <none> 27017:30780/TCP 13h NAME DESIRED CURRENT AGE statefulset.apps/chicago-rs1 3 3 13h
  • 18. High Availability - replication + statefulset = kubectl delete pod chicago-rs1-1 pod "chicago-rs1-1" deleted root@ip-172-31-19-43:~# kubectl get all --selector=app=chicago-rs1-svc NAME READY STATUS RESTARTS AGE pod/chicago-rs1-0 1/1 Running 12 13h pod/chicago-rs1-1 1/1 Running 0 1m pod/chicago-rs1-2 1/1 Running 12 13h NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/chicago-rs1-svc ClusterIP None <none> 27017/TCP 13h service/chicago-rs1-svc-external NodePort 10.102.95.40 <none> 27017:30780/TCP 13h NAME DESIRED CURRENT AGE statefulset.apps/chicago-rs1 3 3 13h
  • 19. Scaling # vim chicago-rs1.yaml # kubectl apply -f chicago-rs1.yaml mongodbreplicaset.mongodb.com/chicago-rs1 configured # kubectl get all --selector=app=chicago-rs1-svc NAME READY STATUS RESTARTS AGE pod/chicago-rs1-0 1/1 Running 12 13h pod/chicago-rs1-1 1/1 Running 0 3m pod/chicago-rs1-2 1/1 Running 12 13h pod/chicago-rs1-3 1/1 Running 0 10s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/chicago-rs1-svc ClusterIP None <none> 27017/TCP 13h service/chicago-rs1-svc-external NodePort 10.102.95.40 <none> 27017:30780/TCP 13h NAME DESIRED CURRENT AGE statefulset.apps/chicago-rs1 4 4 13h
  • 20. Part 2 - Advanced Configuration
  • 22. Persistent Storage - DB right? apiVersion: mongodb.com/v1 kind: MongoDbReplicaSet metadata: name: chicago-rs1 namespace: mongodb spec: members: 3 version: 4.0.0 project: dotlocal-chicago credentials: opsmgr-credentials podSpec: storage: 5G storageClass: managed-premium
  • 23. Persistent Storage - What's createdkubectl get sc,pv,pvc --output=custom-columns=KIND:.kind,NAME:.metadata.name,STATUS:.status.phas e KIND NAME STATUS StorageClass default <none> StorageClass managed-premium <none> PersistentVolume pvc-2428e963-b5ff-11e8-bef4-0a58ac1f12f3 Bound PersistentVolume pvc-877ac893-b5ff-11e8-bef4-0a58ac1f12f3 Bound PersistentVolume pvc-c8993a87-b5ff-11e8-bef4-0a58ac1f12f3 Bound PersistentVolumeClaim data-chicago-rs1-0 Bound PersistentVolumeClaim data-chicago-rs1-1 Bound PersistentVolumeClaim data-chicago-rs1-2 Bound
  • 24. Node Affinity & Anti-Affinity --- apiVersion: mongodb.com/v1 kind: MongoDbReplicaSet metadata: name: chicago-rs1-happy-nodes namespace: mongodb spec: members: 3 version: 4.0.0 project: dotlocal-chicago credentials: opsmgr-credentials podSpec: storage: 5G storageClass: managed-premium nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: mood operator: In values: - happy
  • 25. Node Affinity & Anti-Affinity [ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$ kubectl describe node aks-nodepool1-21637950-{0,1,2} | grep -E "^Name:|mood" Name: aks-nodepool1-21637950-0 mood=happy Name: aks-nodepool1-21637950-1 mood=happy Name: aks-nodepool1-21637950-2 mood=content [ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$ kubectl describe node aks-nodepool1-21637950-{0,1,2} | grep -E "^ mongodb|^Name:" Name: aks-nodepool1-21637950-0 mongodb chicago-rs1-2 0 (0%) 0 (0%) 0 (0%) 0 (0%) mongodb chicago-rs1-happy-2 0 (0%) 0 (0%) 0 (0%) 0 (0%) mongodb chicago-rs1-happy-nodes-0 0 (0%) 0 (0%) 0 (0%) 0 (0%) mongodb chicago-rs1-happy-nodes-2 0 (0%) 0 (0%) 0 (0%) 0 (0%) mongodb mongodb-enterprise-operator-57bdc5c59f-lq6gt 0 (0%) 0 (0%) 0 (0%) 0 (0%) Name: aks-nodepool1-21637950-1 mongodb chicago-rs1-0 0 (0%) 0 (0%) 0 (0%) 0 (0%) mongodb chicago-rs1-happy-0 0 (0%) 0 (0%) 0 (0%) 0 (0%) mongodb chicago-rs1-happy-nodes-1 0 (0%) 0 (0%) 0 (0%) 0 (0%) Name: aks-nodepool1-21637950-2 mongodb chicago-rs1-1 0 (0%) 0 (0%) 0 (0%) 0 (0%) mongodb chicago-rs1-happy-1 0 (0%) 0 (0%) 0 (0%) 0 (0%) [ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$ ^C
  • 26. Demo Connecting to your MongoDB deployment
  • 27. intra-k8s cluster connections 1. Jump into cluster: kubectl exec -it chicago-rs1-0 -- /bin/bash 2. Find mongo binaries - run shell ps -ef | grep mongo /var/lib/mongodb-mms-automation/mongodb-linux-x86_64-4.0.0/bin/mon go "mongodb://chicago-rs1-0.chicago-rs1-svc.mongodb.svc.cluster.local ,chicago-rs1-1.chicago-rs1-svc.mongodb.svc.cluster.local,chicago-r s1-2.chicago-rs1-svc.mongodb.svc.cluster.local/?replicaSet=chicago -rs1"
  • 28. mongodb+srv:// #!/bin/bash : ${1?"Usage: $0 <MongoDB Service Name>"} POD_STATE_WAIT_SECONDS=5 SERVICE=$1 DNS_SRV_POD="mongodb-${SERVICE}-dns-srv-test" SIMPLE_CONNECTION_POD="mongodb-${SERVICE}-connection-test" echo "MongoDB Enterprise Kubernetes - DNS SRV Connection Test - START" echo "Testing service '${SERVICE}'" echo "DNS SRV pod '${DNS_SRV_POD}'" echo "Connection test pod '${SIMPLE_CONNECTION_POD}'" kubectl run ${DNS_SRV_POD} --restart=Never --image=tutum/dnsutils -- host -t srv ${SERVICE} STATE="" while [ "${STATE}" != "Terminated" ] do STATE=$(kubectl describe pod ${DNS_SRV_POD} | grep "State:" | cut -d":" -f2 | tr -d '[:space:]') if [ "${STATE}" = "Terminated" ]; then break; fi echo "Polling state for pod '${DNS_SRV_POD}': ${STATE} ...sleeping ${POD_STATE_WAIT_SECONDS}" sleep ${POD_STATE_WAIT_SECONDS} done kubectl logs ${DNS_SRV_POD} SRV_HOST=$(kubectl logs ${DNS_SRV_POD} | cut -d' ' -f1 | head -1) echo "Found SRV hostname: '${SRV_HOST}'" kubectl run ${SIMPLE_CONNECTION_POD} --restart=Never --image=jmimick/simple-mongodb-connection-tester "${SRV_HOST}" STATE="" while [ "${STATE}" != "Terminated" ] do STATE=$(kubectl describe pod ${SIMPLE_CONNECTION_POD} | grep "State:" | cut -d":" -f2 | tr -d '[:space:]') if [ "${STATE}" = "Terminated" ]; then break; fi echo "Polling state for pod '${SIMPLE_CONNECTION_POD}': ${STATE} ...sleeping ${POD_STATE_WAIT_SECONDS}" sleep ${POD_STATE_WAIT_SECONDS} done kubectl logs ${SIMPLE_CONNECTION_POD} | head echo "...truncating logs, 100 documents should've been inserted..." kubectl logs ${SIMPLE_CONNECTION_POD} | tail kubectl delete pod ${DNS_SRV_POD} kubectl delete pod ${SIMPLE_CONNECTION_POD}
  • 29. ./connection-srv-demo.sh chicago-rs1-svc MongoDB Enterprise Kubernetes - DNS SRV Connection Test - START Testing service 'chicago-rs1-svc' DNS SRV pod 'mongodb-chicago-rs1-svc-dns-srv-test' Connection test pod 'mongodb-chicago-rs1-svc-connection-test' pod/mongodb-chicago-rs1-svc-dns-srv-test created Polling state for pod 'mongodb-chicago-rs1-svc-dns-srv-test': Waiting ...sleeping 5 chicago-rs1-svc.mongodb.svc.cluster.local has SRV record 10 33 0 chicago-rs1-0.chicago-rs1-svc.mongodb.svc.cluster.local. chicago-rs1-svc.mongodb.svc.cluster.local has SRV record 10 33 0 chicago-rs1-1.chicago-rs1-svc.mongodb.svc.cluster.local. chicago-rs1-svc.mongodb.svc.cluster.local has SRV record 10 33 0 chicago-rs1-2.chicago-rs1-svc.mongodb.svc.cluster.local. Found SRV hostname: 'chicago-rs1-svc.mongodb.svc.cluster.local' pod/mongodb-chicago-rs1-svc-connection-test created Polling state for pod 'mongodb-chicago-rs1-svc-connection-test': Waiting ...sleeping 5 simple-connection-test: testing connection to chicago-rs1-svc.mongodb.svc.cluster.local Creating and reading 100 docs in the 'test-6b676382.foo' namespace Database(MongoClient(host=['chicago-rs1-svc.mongodb.svc.cluster.local:27017'], document_class=dict, tz_aware=False, connect=True), u'test-6b676382') {u'i': 0, u'_id': ObjectId('5b98992c62b04e00014b7d5a')} {u'i': 1, u'_id': ObjectId('5b98992d62b04e00014b7d5b')} {u'i': 2, u'_id': ObjectId('5b98992d62b04e00014b7d5c')} ...truncating logs, 100 documents should've been inserted... {u'i': 97, u'_id': ObjectId('5b98992d62b04e00014b7dbb')} {u'i': 98, u'_id': ObjectId('5b98992d62b04e00014b7dbc')} {u'i': 99, u'_id': ObjectId('5b98992d62b04e00014b7dbd')} Dropped db 'test-6b676382' pod "mongodb-chicago-rs1-svc-dns-srv-test" deleted pod "mongodb-chicago-rs1-svc-connection-test" deleted [ec2-user@ip-172-31-58-143 mongodb-enterprise-kubernetes]$
  • 30. Part 3 - Release plans & coming features
  • 31. Roadmap Additional Features Release Plans SSL/TLS Authentication Enabling Backups Running Ops Manager inside Kubernetes Beta now - target Q1 2019 for GA https://docs.opsmanager.mongodb.com/cu rrent/reference/known-issues-k8s-beta/ OpenShift 3.11
  • 32. Community Resources Where to get involved and learn more Github: https://github.com/mongodb/mongodb-enterprise-kubernetes Slack: https://launchpass.com/mongo-db #enterprise-kubernetes Talk to me!