SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
opsmanager-kubernetes
December 8, 2018
1 MongoDB Enterprise Kubernetes Operator
1.1 Agenda
• High level overview of Kubernetes
• Kubernetes Cluster vs MongoDB Cluster
• Statefull vs Stateless Replication
• Kubernetes Operators
• Ops Manager Kubernetes Operator
• Build a local cluster along the way
1.2 > whoami
{
"name": "Norberto Leite",
"position": "Lead Engineer",
"team": "Curriculum, Engineering"
}
Norberto Leite
1
mflix front page
1.2.1 [@nleite](https://twitter.com/nleite)
1.2.2 Disclaimer
This is a buzzword intensive presentation but by no means intended to trick you into
thinking I’m a very smart person! Buzzwords just sound nice when put together...
1.2.3 But before we get started ....
replace this image
1.2.4 MongoDB Developer Courses
https://university.mongodb.com/
2
M220 MongoDB University Courses
Kubernetes Logo
1.3 Kubernetes
1.3.1 Kubernetes Vendor Ecosystem
https://blog.spotinst.com/2018/05/20/kubernetes-ecosystem/
1.3.2 Definition
Kubernetes is an open-source container-orchestration system for automating deployment, scaling
and management of containerized applications. It was originally designed by Google and is now
maintained by the Cloud Native Computing Foundation
Kubernetes Objects
• pods
• replicasets
• persistentvolumeclaims
• persistentvolumes
• nodes
• storageclasses
• clusters
• ...
https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/
1.3.3 Kubernetes is for Containers => Virginia is for Lovers
Kubernetes is an open-source container-orchestration system for automating deployment, scal-
ing and management of containerized applications. It was originally designed by Google and
3
Kubernetes Vendors
Kubernetes Definition
4
is now maintained by the Cloud Native Computing Foundation
Kubernetes uses containers. Well, we can say that kubernetes loves containers. Deploys and
manages containers and containerized applications
Kubernetes has standardized the container definition on the Docker format.
1.3.4 Container Definition
cat mflix/Dockerfile
# base image of mflix container
FROM java:8
# port number the container exposes
EXPOSE 90000
# make the jar file available in the container image
COPY mflix-1.0-SNAPSHOT.jar ./mflix-1.0-SNAPSHOT.jar
# application run command
CMD ["java", "-jar", "./mflix-1.0-SNAPSHOT.jar"]
In this file we can see an example of a Docker image file. Sets the instructions to load, expose
and execute containarized applications or instances.
The Docker images are hiearchical, this means that we can compose images uppon each other,
inheriting the configuration and image setup
In this example we are creating a container image using as baseline a Java image.
1.3.5 Image vs Container
An image determines what and how to run, using/inherinting which requierements and the de-
fault configuration of a containerized application
A container is the the runtime execution of a built Docker image.
5
Image vs Container
6
kubernetes_definition
1.3.6 Image vs Container Diagram
https://stackoverflow.com/questions/23735149/what-is-the-difference-between-a-
docker-image-and-a-container
1.3.7 Kubernetes Manages Containers
Kubernetes is an open-source container-orchestration system for automating deployment,
scaling and management of containerized applications. It was originally designed by Google
and is now maintained by the Cloud Native Computing Foundation
Aside from running containers, Kubernetes is also capable of defining the rules of when to
start/stop containers, how containers communicate with one another, how we scale deployments,
how to upgrade versions of containers, how to provide HA and fault-tolerance and where to place
different containers into different nodes / machines.
1.4 Kubernetes Architecture
On a high level, kubernetes can be represented by something similar to this diagram.
For each Kubernetes cluster, we will have master node, which holds a set of important compo-
nents of the architecture:
• kube-scheduler
• kube-control-manager
• kube-apiserver
• etcd
• kubelet
• kube-proxy
Each of these I’ll provide the relevant links for the exact function within a k8s cluster, however
the names of these components are pretty self explanatory. The unusual one, that might be a bit
more criptic in terms of meaning, given that the name might mean very different things, is etcd,
7
Kubernetes Architecture
which is an HA key value store, that Kubernetes uses for all cluster data. You can think of etcd as
the config server in a MongoDB sharded cluster, which may or may not be set to run within the
master node at all. It can run on it’s own separate node.
You will find all the relevant links at the end of this presentation.
But in essence, the master node runs a fair amount of different processes.
https://github.com/kubernetes/community/blob/master/contributors/design-
proposals/architecture/architecture.md#the-kubernetes-node
1.4.1 Multi-master Kubernetes with kubeadm
Given the previous diagram, you might been thinking
this Kubernetes cluster thing does not seem to be too scalable, how in this day an age
does a cluster have only one master.
Well, fear not, kubernetes does have a way to avoid single points of failure using kubeadm.
This is out-of-scope for this talk, but keep in mind that this alone can be setup in several different
architectures.
Bottom line is that kubernetes can be set to run in an HA mode.
1.4.2 Kubernetes Node
Kubernetes is a cluster, therefore > there will be dragons!
Not really, but there will be nodes. Aside from the previously aluded Master node, or several
of these master nodes, k8s also has worker nodes, previously known as minions
K8s nodes can have serveral different specs. We can compose a k8s cluster with physical,
virtual and cloud server nodes. Although, like in any systems archicture, consistency tends to be
benefitial on the long term, a k8s cluster can be composed by a very diverse set of server instance
specs. | Each node is composed with the necessary processes to run pods. Each has a container
runtime, generally docker, to allow the nodes to deploy and run containers.
8
Kubernetes HA archictecture
formely know as minion
9
POD Diagram
1.4.3 Kubernetes POD
https://kubernetes.io/docs/concepts/workloads/pods/pod/
A POD is the smallest deployable unit of computing in Kubernetes.
Can be composed of one or several different containers, a group of containers, and allows the
definition of shared network and storage, and how to run the set of containers that compose the
POD.
1.4.4 Kubernetes ReplicaSet - Across Nodes
https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
Kubernetes allows for pods to be fault tolerant and highly available. This managed via Repli-
caSes (familiar name!)
We can define PODs replica sets across nodes
10
replica set single node
1.4.5 Kubernetes ReplicaSet - Single Node
Or within a single node. This is model that we are going to setup today.
1.4.6 Kubernetes Service
https://kubernetes.io/docs/concepts/services-networking/service/
Services are a speciall type of POD that that other PODs relly on to operate. Now, by default
PODs are mortal and get resurected dynamically, and they subject to constant change in terms of
their deployment composition, number of replica nodes etc. This can cause issues to other PODs
if those rely in some guarantees and pre-defined configuration.
A Kubernetes Service is an abstraction which defines a logical set of PODs and a policy by
which to access them. You find Services as relliable and consistent PODs to support other PODs.
11
ops manager diagram
1.5 Ops Manager / Cloud Manager
MongoDB Ops Manager is a MongoDB on-prem solution for managing MongoDB Cluster deploy-
ments. Allows for an holistic management of all things related with MongoDB
• updates
• scaling up and down
• user management and integration
• node deployment
• role management
Across you datacenter.
And there are several particular aspects of a MongoDB Cluster that need care and attention,
something that ops manager takes care of in a very efficient way.
1.5.1 Cloud / Ops Manager - Monitoring
1.5.2 Cloud / Ops Manager - Automation
1.5.3 Cloud / Ops Manager - Backup
1.5.4 Cloud / Ops Manager Agents
1.6 Kubernetes Cluster vs MongoDB Cluster
There are several similar notions and definitions between a Kubernetes cluster and a MongoDB
cluster.
But the devil is in the details and in the functionality of each of these clusters.
1.6.1 Cluster Concepts
• MongoDB Replica Set
• Kubernetes Replica Set
• MongoDB Node
• Kubernetes Node
12
Ops Manager Monitoring
13
Ops Manager Automation
14
Ops Manager Backup
15
Ops Manager Agents
Kubernetes vs MongoDB Cluster
16
Kubernetes Nodes vs MongoDB Nodes
1.6.2 Kubernetes Node vs MongoDB Node
1.6.3 MongoDB Nodes in a Kubernetes Node
1.6.4 Kubernetes ReplicaSet vs MongoDB ReplicaSet
While there purpose for each of the replica set notions is to provide fault tollerance, these are
pretty distinct.
In a POD replication, the definition of the containers is replicate has defined, either to a differ-
ent pod running in the same node or accross different nodes.
In a MongoDB Replica Set, the fault tollerance and HA is also associated with a dynamic intra
replica set rules and options. All nodes of a MongoDB Replica set share the exact same data, they
follow a replication protocol and respond to workloads as a single shared state. This is generally
not the case in a Kubernetes Replica Set.
A nice way to distinguish these two different replica sets is to think in terms of Kubernetes
replica sets as redundancy of application instances/containers, while a MongoDB replica set as-
sures redundancy and HA of data, regardless of the specification of the instance that supports that
service, although all nodes only run a mongodb binary.
1.7 Stateless vs Statefull
One important aspect to keep in mind around cluster management, in particular scalability of
clusters, concernes state and state management.
In generall, container technology is extremely efficient scalling out stateless applications and
systems. This as to do with the fact that state, data, adds density to the scalability. It tends to be
more complicated to manage data then intances.
And this where Kubernetes, via persistent volumes, allows containers scallability to be better
aligned, not perfect with the notion of scaling systems that rely and manage state.
17
Kubernetes MongoDB POD
18
Replica Sets
Stateless vs Statefull
19
All Together Now
Getting a system that excels at data management, like mongodb , combined with the scalabilty
offered by kubernetes is a very appealing solution for ops professionals.
1.8 Kubernetes Operator
An Operator is a method of packaging, deploying and managing a Kubernetes appli-
cation. A Kubernetes application is an application that is both deployed on Kubernetes
and managed using the Kubernetes APIs and kubectl tooling.
https://coreos.com/operators/
1.9 MongoDB Enterprise Kubernetes Operator (beta)
The Operator enables easy deploys of MongoDB into Kubernetes clusters, using our
management, monitoring and backup platforms, Ops Manager and Cloud Manager.
By installing this integration, you will be able to deploy MongoDB instances with a
single simple command.
https://github.com/mongodb/mongodb-enterprise-kubernetes
1.9.1 MongoDB Enterprise Kubernetes - Main Benefits
• Quick, declarative definition of what MongoDB services you want
• Auto-healing, using Kubernetes reliability features
• Easy to scale up / scale down
1.10 All Together Now!
https://upload.wikimedia.org/wikipedia/en/c/cd/All_Together_Now_cover.jpg
1.11 Kubernetes + Cloud/Ops Manager
Step 1 - Create Kubernetes Cluster and Cloud/Ops Manager Instance
Step 2 - Install Enterprise Kubernetes Operator
Step 3 - Apply Deployment
Step 4 - Setup Deployment PODs and Agents
Step 5 - Cluster Up and Running Managed by Cloud/Ops Manager
20
Kubernetes + Ops Manager Deployment
Step 1 - K8S and Ops Manager Instances
21
Step 2 - Install MongoDB Enterprise Operator
Step 3 - Apply Deployment
22
Step 4 - Operator installs Ops Manager agents
Step 5 - Full functioning cluster
23
typical kubernetes cluster image
1.12 Let’s do it!
1.12.1 Typical Image of a Kubernetes Cluster
http://johnmclaughlin.info/learn-kubernetes-using-minikube-docker-macos/
In many different presentations and content out there, in the interwebs, you will see this typical
image of big container ship and lots of containers in it.
Which is nice.
1.12.2 This is what we are going to do today ;)
http://www.simplyorganized.me/2017/05/video-professional-organizers-
organized-fridge-freezer.html
However, in the majority of cases, what you end up setting up is a small set of fridge contain-
ers. That’s exactly what we are going to do today.
1.13 Recap
• Basic overview of Kubernetes components and architecture
• How to locally install a Kubernetes cluster
• How to deploy containarized applications in Kubernetes
• How to deploy and manage a MongoDB Cluster in Kubernetes
• How to integrate Ops Manager | Cloud Manager with Kubernetes
1.13.1 References and Glossory
• kubectl documentation
• kubernetes node
• kubeadm documentation
24
fridge containers
• MongoDB Enterprise Kubernetes Operator
– Installation tutorial
– Source code repository
1.14 QA ? / Notes / Thank You!
25

Mais conteúdo relacionado

Mais procurados

Oracle GoldenGate Roadmap Oracle OpenWorld 2020
Oracle GoldenGate Roadmap Oracle OpenWorld 2020 Oracle GoldenGate Roadmap Oracle OpenWorld 2020
Oracle GoldenGate Roadmap Oracle OpenWorld 2020
Oracle
 
MongoDB概要:金融業界でのMongoDB
MongoDB概要:金融業界でのMongoDBMongoDB概要:金融業界でのMongoDB
MongoDB概要:金融業界でのMongoDB
ippei_suzuki
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
TO THE NEW | Technology
 

Mais procurados (20)

Sql server basics
Sql server basicsSql server basics
Sql server basics
 
Introducing to Azure Functions
Introducing to Azure FunctionsIntroducing to Azure Functions
Introducing to Azure Functions
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
 
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
 
Scaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ssScaling paypal workloads with oracle rac ss
Scaling paypal workloads with oracle rac ss
 
IBMが新しいJava EEコンテナを作っているらしい -Libertyプロファイルとは-
IBMが新しいJava EEコンテナを作っているらしい -Libertyプロファイルとは-IBMが新しいJava EEコンテナを作っているらしい -Libertyプロファイルとは-
IBMが新しいJava EEコンテナを作っているらしい -Libertyプロファイルとは-
 
Oracle WebLogic Server製品紹介資料(2020年/3月版)
Oracle WebLogic Server製品紹介資料(2020年/3月版)Oracle WebLogic Server製品紹介資料(2020年/3月版)
Oracle WebLogic Server製品紹介資料(2020年/3月版)
 
Intro To MongoDB
Intro To MongoDBIntro To MongoDB
Intro To MongoDB
 
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
GoldenGateテクニカルセミナー2「Oracle GoldenGate 新機能情報」(2016/5/11)
 
MongoDB Security Introduction - Presentation
MongoDB Security Introduction - PresentationMongoDB Security Introduction - Presentation
MongoDB Security Introduction - Presentation
 
Oracle Database Vaultのご紹介
Oracle Database Vaultのご紹介Oracle Database Vaultのご紹介
Oracle Database Vaultのご紹介
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoduction
 
Oracle GoldenGate Roadmap Oracle OpenWorld 2020
Oracle GoldenGate Roadmap Oracle OpenWorld 2020 Oracle GoldenGate Roadmap Oracle OpenWorld 2020
Oracle GoldenGate Roadmap Oracle OpenWorld 2020
 
MongoDB概要:金融業界でのMongoDB
MongoDB概要:金融業界でのMongoDBMongoDB概要:金融業界でのMongoDB
MongoDB概要:金融業界でのMongoDB
 
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal ScalingMySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
 
Installing oracle grid infrastructure and database 12c r1
Installing oracle grid infrastructure and database 12c r1Installing oracle grid infrastructure and database 12c r1
Installing oracle grid infrastructure and database 12c r1
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Oracle Cloud Infrastructure:2022年4月度サービス・アップデート
Oracle Cloud Infrastructure:2022年4月度サービス・アップデートOracle Cloud Infrastructure:2022年4月度サービス・アップデート
Oracle Cloud Infrastructure:2022年4月度サービス・アップデート
 
Materialized Views and Secondary Indexes in Scylla: They Are finally here!
Materialized Views and Secondary Indexes in Scylla: They Are finally here!Materialized Views and Secondary Indexes in Scylla: They Are finally here!
Materialized Views and Secondary Indexes in Scylla: They Are finally here!
 
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#3
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#3しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#3
しばちょう先生が語る!オラクルデータベースの進化の歴史と最新技術動向#3
 

Semelhante a MongoDB Ops Manager + Kubernetes

Stateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
Stateful, Stateless and Serverless - Running Apache Kafka® on KubernetesStateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
Stateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
confluent
 

Semelhante a MongoDB Ops Manager + Kubernetes (20)

Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdfstupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
 
prodops.io k8s presentation
prodops.io k8s presentationprodops.io k8s presentation
prodops.io k8s presentation
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
 
Google Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTEGoogle Cloud Platform Kubernetes Workshop IYTE
Google Cloud Platform Kubernetes Workshop IYTE
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
 
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas Kolenkin
 
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...
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on KubernetesA guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetes
 
Mesos vs kubernetes comparison
Mesos vs kubernetes comparisonMesos vs kubernetes comparison
Mesos vs kubernetes comparison
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
 
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_
 
Stateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
Stateful, Stateless and Serverless - Running Apache Kafka® on KubernetesStateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
Stateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
 

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: 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...
 
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDBMongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
MongoDB .local Paris 2020: Les bonnes pratiques pour sécuriser MongoDB
 

Último

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Último (20)

WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 

MongoDB Ops Manager + Kubernetes

  • 1. opsmanager-kubernetes December 8, 2018 1 MongoDB Enterprise Kubernetes Operator 1.1 Agenda • High level overview of Kubernetes • Kubernetes Cluster vs MongoDB Cluster • Statefull vs Stateless Replication • Kubernetes Operators • Ops Manager Kubernetes Operator • Build a local cluster along the way 1.2 > whoami { "name": "Norberto Leite", "position": "Lead Engineer", "team": "Curriculum, Engineering" } Norberto Leite 1
  • 2. mflix front page 1.2.1 [@nleite](https://twitter.com/nleite) 1.2.2 Disclaimer This is a buzzword intensive presentation but by no means intended to trick you into thinking I’m a very smart person! Buzzwords just sound nice when put together... 1.2.3 But before we get started .... replace this image 1.2.4 MongoDB Developer Courses https://university.mongodb.com/ 2
  • 3. M220 MongoDB University Courses Kubernetes Logo 1.3 Kubernetes 1.3.1 Kubernetes Vendor Ecosystem https://blog.spotinst.com/2018/05/20/kubernetes-ecosystem/ 1.3.2 Definition Kubernetes is an open-source container-orchestration system for automating deployment, scaling and management of containerized applications. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation Kubernetes Objects • pods • replicasets • persistentvolumeclaims • persistentvolumes • nodes • storageclasses • clusters • ... https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/ 1.3.3 Kubernetes is for Containers => Virginia is for Lovers Kubernetes is an open-source container-orchestration system for automating deployment, scal- ing and management of containerized applications. It was originally designed by Google and 3
  • 5. is now maintained by the Cloud Native Computing Foundation Kubernetes uses containers. Well, we can say that kubernetes loves containers. Deploys and manages containers and containerized applications Kubernetes has standardized the container definition on the Docker format. 1.3.4 Container Definition cat mflix/Dockerfile # base image of mflix container FROM java:8 # port number the container exposes EXPOSE 90000 # make the jar file available in the container image COPY mflix-1.0-SNAPSHOT.jar ./mflix-1.0-SNAPSHOT.jar # application run command CMD ["java", "-jar", "./mflix-1.0-SNAPSHOT.jar"] In this file we can see an example of a Docker image file. Sets the instructions to load, expose and execute containarized applications or instances. The Docker images are hiearchical, this means that we can compose images uppon each other, inheriting the configuration and image setup In this example we are creating a container image using as baseline a Java image. 1.3.5 Image vs Container An image determines what and how to run, using/inherinting which requierements and the de- fault configuration of a containerized application A container is the the runtime execution of a built Docker image. 5
  • 7. kubernetes_definition 1.3.6 Image vs Container Diagram https://stackoverflow.com/questions/23735149/what-is-the-difference-between-a- docker-image-and-a-container 1.3.7 Kubernetes Manages Containers Kubernetes is an open-source container-orchestration system for automating deployment, scaling and management of containerized applications. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation Aside from running containers, Kubernetes is also capable of defining the rules of when to start/stop containers, how containers communicate with one another, how we scale deployments, how to upgrade versions of containers, how to provide HA and fault-tolerance and where to place different containers into different nodes / machines. 1.4 Kubernetes Architecture On a high level, kubernetes can be represented by something similar to this diagram. For each Kubernetes cluster, we will have master node, which holds a set of important compo- nents of the architecture: • kube-scheduler • kube-control-manager • kube-apiserver • etcd • kubelet • kube-proxy Each of these I’ll provide the relevant links for the exact function within a k8s cluster, however the names of these components are pretty self explanatory. The unusual one, that might be a bit more criptic in terms of meaning, given that the name might mean very different things, is etcd, 7
  • 8. Kubernetes Architecture which is an HA key value store, that Kubernetes uses for all cluster data. You can think of etcd as the config server in a MongoDB sharded cluster, which may or may not be set to run within the master node at all. It can run on it’s own separate node. You will find all the relevant links at the end of this presentation. But in essence, the master node runs a fair amount of different processes. https://github.com/kubernetes/community/blob/master/contributors/design- proposals/architecture/architecture.md#the-kubernetes-node 1.4.1 Multi-master Kubernetes with kubeadm Given the previous diagram, you might been thinking this Kubernetes cluster thing does not seem to be too scalable, how in this day an age does a cluster have only one master. Well, fear not, kubernetes does have a way to avoid single points of failure using kubeadm. This is out-of-scope for this talk, but keep in mind that this alone can be setup in several different architectures. Bottom line is that kubernetes can be set to run in an HA mode. 1.4.2 Kubernetes Node Kubernetes is a cluster, therefore > there will be dragons! Not really, but there will be nodes. Aside from the previously aluded Master node, or several of these master nodes, k8s also has worker nodes, previously known as minions K8s nodes can have serveral different specs. We can compose a k8s cluster with physical, virtual and cloud server nodes. Although, like in any systems archicture, consistency tends to be benefitial on the long term, a k8s cluster can be composed by a very diverse set of server instance specs. | Each node is composed with the necessary processes to run pods. Each has a container runtime, generally docker, to allow the nodes to deploy and run containers. 8
  • 10. POD Diagram 1.4.3 Kubernetes POD https://kubernetes.io/docs/concepts/workloads/pods/pod/ A POD is the smallest deployable unit of computing in Kubernetes. Can be composed of one or several different containers, a group of containers, and allows the definition of shared network and storage, and how to run the set of containers that compose the POD. 1.4.4 Kubernetes ReplicaSet - Across Nodes https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ Kubernetes allows for pods to be fault tolerant and highly available. This managed via Repli- caSes (familiar name!) We can define PODs replica sets across nodes 10
  • 11. replica set single node 1.4.5 Kubernetes ReplicaSet - Single Node Or within a single node. This is model that we are going to setup today. 1.4.6 Kubernetes Service https://kubernetes.io/docs/concepts/services-networking/service/ Services are a speciall type of POD that that other PODs relly on to operate. Now, by default PODs are mortal and get resurected dynamically, and they subject to constant change in terms of their deployment composition, number of replica nodes etc. This can cause issues to other PODs if those rely in some guarantees and pre-defined configuration. A Kubernetes Service is an abstraction which defines a logical set of PODs and a policy by which to access them. You find Services as relliable and consistent PODs to support other PODs. 11
  • 12. ops manager diagram 1.5 Ops Manager / Cloud Manager MongoDB Ops Manager is a MongoDB on-prem solution for managing MongoDB Cluster deploy- ments. Allows for an holistic management of all things related with MongoDB • updates • scaling up and down • user management and integration • node deployment • role management Across you datacenter. And there are several particular aspects of a MongoDB Cluster that need care and attention, something that ops manager takes care of in a very efficient way. 1.5.1 Cloud / Ops Manager - Monitoring 1.5.2 Cloud / Ops Manager - Automation 1.5.3 Cloud / Ops Manager - Backup 1.5.4 Cloud / Ops Manager Agents 1.6 Kubernetes Cluster vs MongoDB Cluster There are several similar notions and definitions between a Kubernetes cluster and a MongoDB cluster. But the devil is in the details and in the functionality of each of these clusters. 1.6.1 Cluster Concepts • MongoDB Replica Set • Kubernetes Replica Set • MongoDB Node • Kubernetes Node 12
  • 16. Ops Manager Agents Kubernetes vs MongoDB Cluster 16
  • 17. Kubernetes Nodes vs MongoDB Nodes 1.6.2 Kubernetes Node vs MongoDB Node 1.6.3 MongoDB Nodes in a Kubernetes Node 1.6.4 Kubernetes ReplicaSet vs MongoDB ReplicaSet While there purpose for each of the replica set notions is to provide fault tollerance, these are pretty distinct. In a POD replication, the definition of the containers is replicate has defined, either to a differ- ent pod running in the same node or accross different nodes. In a MongoDB Replica Set, the fault tollerance and HA is also associated with a dynamic intra replica set rules and options. All nodes of a MongoDB Replica set share the exact same data, they follow a replication protocol and respond to workloads as a single shared state. This is generally not the case in a Kubernetes Replica Set. A nice way to distinguish these two different replica sets is to think in terms of Kubernetes replica sets as redundancy of application instances/containers, while a MongoDB replica set as- sures redundancy and HA of data, regardless of the specification of the instance that supports that service, although all nodes only run a mongodb binary. 1.7 Stateless vs Statefull One important aspect to keep in mind around cluster management, in particular scalability of clusters, concernes state and state management. In generall, container technology is extremely efficient scalling out stateless applications and systems. This as to do with the fact that state, data, adds density to the scalability. It tends to be more complicated to manage data then intances. And this where Kubernetes, via persistent volumes, allows containers scallability to be better aligned, not perfect with the notion of scaling systems that rely and manage state. 17
  • 20. All Together Now Getting a system that excels at data management, like mongodb , combined with the scalabilty offered by kubernetes is a very appealing solution for ops professionals. 1.8 Kubernetes Operator An Operator is a method of packaging, deploying and managing a Kubernetes appli- cation. A Kubernetes application is an application that is both deployed on Kubernetes and managed using the Kubernetes APIs and kubectl tooling. https://coreos.com/operators/ 1.9 MongoDB Enterprise Kubernetes Operator (beta) The Operator enables easy deploys of MongoDB into Kubernetes clusters, using our management, monitoring and backup platforms, Ops Manager and Cloud Manager. By installing this integration, you will be able to deploy MongoDB instances with a single simple command. https://github.com/mongodb/mongodb-enterprise-kubernetes 1.9.1 MongoDB Enterprise Kubernetes - Main Benefits • Quick, declarative definition of what MongoDB services you want • Auto-healing, using Kubernetes reliability features • Easy to scale up / scale down 1.10 All Together Now! https://upload.wikimedia.org/wikipedia/en/c/cd/All_Together_Now_cover.jpg 1.11 Kubernetes + Cloud/Ops Manager Step 1 - Create Kubernetes Cluster and Cloud/Ops Manager Instance Step 2 - Install Enterprise Kubernetes Operator Step 3 - Apply Deployment Step 4 - Setup Deployment PODs and Agents Step 5 - Cluster Up and Running Managed by Cloud/Ops Manager 20
  • 21. Kubernetes + Ops Manager Deployment Step 1 - K8S and Ops Manager Instances 21
  • 22. Step 2 - Install MongoDB Enterprise Operator Step 3 - Apply Deployment 22
  • 23. Step 4 - Operator installs Ops Manager agents Step 5 - Full functioning cluster 23
  • 24. typical kubernetes cluster image 1.12 Let’s do it! 1.12.1 Typical Image of a Kubernetes Cluster http://johnmclaughlin.info/learn-kubernetes-using-minikube-docker-macos/ In many different presentations and content out there, in the interwebs, you will see this typical image of big container ship and lots of containers in it. Which is nice. 1.12.2 This is what we are going to do today ;) http://www.simplyorganized.me/2017/05/video-professional-organizers- organized-fridge-freezer.html However, in the majority of cases, what you end up setting up is a small set of fridge contain- ers. That’s exactly what we are going to do today. 1.13 Recap • Basic overview of Kubernetes components and architecture • How to locally install a Kubernetes cluster • How to deploy containarized applications in Kubernetes • How to deploy and manage a MongoDB Cluster in Kubernetes • How to integrate Ops Manager | Cloud Manager with Kubernetes 1.13.1 References and Glossory • kubectl documentation • kubernetes node • kubeadm documentation 24
  • 25. fridge containers • MongoDB Enterprise Kubernetes Operator – Installation tutorial – Source code repository 1.14 QA ? / Notes / Thank You! 25