SlideShare a Scribd company logo
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.
Zero to Hero
Running Postgres in Kubernetes
Taylor Graham : Field CTO
Twitter: @thecloudslayer
1
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.2
WHO IS RUNNING K8S ON LAPTOP?
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.3
WHO
2019 Container Adoption Survey - Diamanti
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.4
WHAT
2019 Container Adoption Survey - Diamanti
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.5
WHERE
2019 Container Adoption Survey - Diamanti
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.6
WHY
• Business: Kubernetes is a system for deploying applications that
can save money because it takes less IT manpower to manage
and helps more efficiently utilize the infrastructure. It helps
make your apps a more portable, so you can move them more
easily between different clouds and internal environments or
laptop to laptop.
• Tech: Agility in development, deployment, and operations
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.7
SETTING THE STAGE
• K8s made for
developers
• K8s team cares
about K8
• Who cares about
the DB inside
K8?
GUI vs CI
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.8
BASIC CONCEPTS
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.9
CLUSTER
• Doc: I could not find a
definition.
• Taylor: A Kubernetes
cluster is everything.
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.10
MASTER
• DOC: The Kubernetes Master is a collection of three processes
that run on a single node in your cluster, which is designated as
the master node. Those processes are: kube-apiserver, kube-
controller-manager and kube-scheduler.The Kubernetes master
is responsible for maintaining the desired state for your cluster.
• Taylor: I would call it the
brains / command and control.
I would think of it like vCenter
coming from that world.
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.11
CLUSTER COMMANDS
Kubectl cluster-info
Kubectl version
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.12
NAMESPACE
• Doc: Namespaces are a way to divide
cluster resources between multiple users.
Namespace provide a scope for names.
Names of resources need to be unique
within a namespace, but not across
namespaces. Namespaces can not be
nested inside one another and each
Kubernetes resource can only be in one
namespace.
• Taylor: It’s a good way not to blow
everything up ASAP.
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.13
NAMESPACE COMMANDS
helm install edb-2.4.2.tgz -f myvalues.yaml –namespace anotherfailwhale
Kubectl create namespace anotherfailwhale
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.14
NODES
• Doc: A node is a worker machine in Kubernetes, previously known
as a minion. A node may be a VM or physical machine, depending
on the cluster. Each node contains the services necessary to
run pods and is managed by the master components. The services
on a node include the container runtime, kubelet and kube-proxy
• Taylor: The physical server
or virtual machine running
all the magic.
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.15
NODE COMMANDS
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.14
NODE COMMANDS
Kubectl get nodes
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.16
POD
• Doc: A Pod is the basic execution unit of a Kubernetes
application–the smallest and simplest unit in the
Kubernetes object model that you create or deploy. A Pod
represents processes running on your Cluster.
• Taylor: Because they
share a localhost with
all containers in pod I
think of it like docker-
compose on your
laptop.
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.17
POD COMMANDS
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.18
AND MORE POD COMMANDS
kubectl describe pod
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.19
SERVICE
• Doc: a Service is an abstraction which defines a
logical set of Pods and a policy by which to
access them. The set of Pods targeted by a
Service is usually determined by a selector.
• Taylor: what the doc said….
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.20
PV/PVC
• Doc: A PersistentVolume (PV) is a piece of storage in the cluster that
has been provisioned by an administrator or dynamically provisioned
using Storage Classes. A PersistentVolumeClaim (PVC) is a request
for storage by a user. It is similar to a pod. Pods consume node
resources and PVCs consume PV resources.
• Taylor: LUN and VMDK
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.21
PV
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.22
DEPLOYMENT / REPLICASET
• A Deployment controller provides declarative updates
for Pods and ReplicaSets.
• A ReplicaSet’s purpose is to maintain a stable set of replica Pods
running at any given time. As such, it is often used to guarantee the
availability of a specified number of identical Pods.
• Taylor:
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.23
STATEFULSET
• Doc: StatefulSet is the workload API object used to manage
stateful applications. Manages the deployment and scaling
of a set of Pods , and provides guarantees about the
ordering and uniqueness of these Pods.
• Taylor: Where you run a
database.
Stable, unique network identifiers. $(statefulset name)-$(ordinal)
Stable, persistent storage.
Ordered, graceful deployment and scaling.
Ordered, automated rolling updates.
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.24
DESIGN PATTERNS
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.25
SINGLE NODE
Postgres
Data
Application
Database
Stand alone Postgres server
basic configuration
Containers
Pods
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.
metrics
26
HA REFERENCE ARCHITECTURE
Postgres
HA
Agent
Proxy
Mon
Agent
Data
Application
EDB-Service
Postgres
HA
Agent
Mon
Agent
Data
Postgres
HA
Agent
DR
Tool
Proxy
Mon
Agent
Data
Admin
Tool
read/writeredundant
streaming
replication
streaming
replication
Shared or Local Storage
Database, Tools, Agents
Containers
Pods
Application Application
Master Standby 2Standby 1
Proxy
Postgres cluster
with application scale-out
Backup
© Copyright EnterpriseDB Corporation, 2019. All rights reserved.
metrics
27
On-Prem In-Memory Compute Nodes
Postgres
HA
Agent
Proxy
Mon
Agent
EDB-Service
Postgres
HA
Agent
Mon
AgentPostgres
HA
Agent
DR
Tool
Proxy
Mon
Agent
Admin
Tool
read/writeredundant
streaming
replication
Database, Tools, Agents
Containers
Pods
Master Standby 2Standby 1
Proxy
NODE POOL DB PREFORMANCE NODE 2 NODE 3
Volume Claim Volume Claim Volume Claim
Data Data DataBackup
Nodes
ApplicationApplication Application
streaming
replication
17k TPS
PgBench
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.28
OK LETS DEPLOY
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.29
KUBECTL
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.30
HELM
• helm install edb-2.4.2.tgz -f myvalues.yaml
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.31
OPENSHIFT
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.32
RANDOM THOUGHTS
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.33
MONITORING THOUGHTS
Old way
Utilization (U): The percentage of time a resource is in use.
Saturation (S): The amount of work the resource must (the “queue” of work).
Errors (E): A count of errors.
RED methodology
Rate (R): The number of requests per second.
Errors (E): The number of failed requests.
Duration (D): The amount of time to process a request.
RED is actually derived from The Four Golden Signals
Latency: The time it takes to service a request.
Traffic: A measure of how much demand on the system.
Errors: The rate of failed requests.
Saturation: A measure of how “full” a service is, often measured by latency.
OOM KILLER
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.34
EVERYTHING ELSE
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.
QUESTIONS & DISCUSSION
35
CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.
THANK YOU
info@enterprisedb.com
www.enterprisedb.com
36
Ad

Recommended

Where Should You Deliver Database Services From?
Where Should You Deliver Database Services From?
EDB
 
Whats New in Postgres 12
Whats New in Postgres 12
EDB
 
Oracle Migration to Postgres in the Cloud
Oracle Migration to Postgres in the Cloud
EDB
 
EPAS + Cloud = Oracle Compatible Postgres in Minutes
EPAS + Cloud = Oracle Compatible Postgres in Minutes
EDB
 
How to Build On-demand Oracle Compatible Postgres Database in Minutes
How to Build On-demand Oracle Compatible Postgres Database in Minutes
EDB
 
PostgreSQL 12: What is coming up?, Enterprise Postgres Day
PostgreSQL 12: What is coming up?, Enterprise Postgres Day
EDB
 
Creating a Multi-Layered Secured Postgres Database
Creating a Multi-Layered Secured Postgres Database
EDB
 
EDB Failover Manager - Features and Demo
EDB Failover Manager - Features and Demo
EDB
 
Automating a PostgreSQL High Availability Architecture with Ansible
Automating a PostgreSQL High Availability Architecture with Ansible
EDB
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at Scale
EDB
 
EDB & ELOS Technologies - Break Free from Oracle
EDB & ELOS Technologies - Break Free from Oracle
EDB
 
PostgreSQL to Accelerate Innovation
PostgreSQL to Accelerate Innovation
EDB
 
The Need For Speed - Strategies to Modernize Your Data Center
The Need For Speed - Strategies to Modernize Your Data Center
EDB
 
Public Sector Virtual Town Hall
Public Sector Virtual Town Hall
EDB
 
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
EDB
 
Discover PostGIS: Add Spatial functions to PostgreSQL
Discover PostGIS: Add Spatial functions to PostgreSQL
EDB
 
Installing Postgres on Linux
Installing Postgres on Linux
EDB
 
Database Dumps and Backups
Database Dumps and Backups
EDB
 
Szabaduljon ki az Oracle szorításából
Szabaduljon ki az Oracle szorításából
EDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
EDB
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
EDB
 
Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project Experience
EDB
 
Overcoming write availability challenges of PostgreSQL
Overcoming write availability challenges of PostgreSQL
EDB
 
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
EDB
 
EDB Postgres Platform 11 Webinar
EDB Postgres Platform 11 Webinar
EDB
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City Project
EDB
 
Remote DBA Service: Powering your DBA needs
Remote DBA Service: Powering your DBA needs
EDB
 
Les nouveautés d'EDB Postgres 11
Les nouveautés d'EDB Postgres 11
EDB
 
Zero-to-Hero: Running Postgres in Kubernetes
Zero-to-Hero: Running Postgres in Kubernetes
EDB
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetes
t8kobayashi
 

More Related Content

What's hot (20)

Automating a PostgreSQL High Availability Architecture with Ansible
Automating a PostgreSQL High Availability Architecture with Ansible
EDB
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at Scale
EDB
 
EDB & ELOS Technologies - Break Free from Oracle
EDB & ELOS Technologies - Break Free from Oracle
EDB
 
PostgreSQL to Accelerate Innovation
PostgreSQL to Accelerate Innovation
EDB
 
The Need For Speed - Strategies to Modernize Your Data Center
The Need For Speed - Strategies to Modernize Your Data Center
EDB
 
Public Sector Virtual Town Hall
Public Sector Virtual Town Hall
EDB
 
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
EDB
 
Discover PostGIS: Add Spatial functions to PostgreSQL
Discover PostGIS: Add Spatial functions to PostgreSQL
EDB
 
Installing Postgres on Linux
Installing Postgres on Linux
EDB
 
Database Dumps and Backups
Database Dumps and Backups
EDB
 
Szabaduljon ki az Oracle szorításából
Szabaduljon ki az Oracle szorításából
EDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
EDB
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
EDB
 
Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project Experience
EDB
 
Overcoming write availability challenges of PostgreSQL
Overcoming write availability challenges of PostgreSQL
EDB
 
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
EDB
 
EDB Postgres Platform 11 Webinar
EDB Postgres Platform 11 Webinar
EDB
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City Project
EDB
 
Remote DBA Service: Powering your DBA needs
Remote DBA Service: Powering your DBA needs
EDB
 
Les nouveautés d'EDB Postgres 11
Les nouveautés d'EDB Postgres 11
EDB
 
Automating a PostgreSQL High Availability Architecture with Ansible
Automating a PostgreSQL High Availability Architecture with Ansible
EDB
 
Webinar: Managing Postgres at Scale
Webinar: Managing Postgres at Scale
EDB
 
EDB & ELOS Technologies - Break Free from Oracle
EDB & ELOS Technologies - Break Free from Oracle
EDB
 
PostgreSQL to Accelerate Innovation
PostgreSQL to Accelerate Innovation
EDB
 
The Need For Speed - Strategies to Modernize Your Data Center
The Need For Speed - Strategies to Modernize Your Data Center
EDB
 
Public Sector Virtual Town Hall
Public Sector Virtual Town Hall
EDB
 
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
New Approaches to Migrating from Oracle to Enterprise-Ready Postgres in the C...
EDB
 
Discover PostGIS: Add Spatial functions to PostgreSQL
Discover PostGIS: Add Spatial functions to PostgreSQL
EDB
 
Installing Postgres on Linux
Installing Postgres on Linux
EDB
 
Database Dumps and Backups
Database Dumps and Backups
EDB
 
Szabaduljon ki az Oracle szorításából
Szabaduljon ki az Oracle szorításából
EDB
 
Cloud Native PostgreSQL - APJ
Cloud Native PostgreSQL - APJ
EDB
 
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
Using PEM to understand and improve performance in Postgres: Postgres Tuning ...
EDB
 
Migration DB2 to EDB - Project Experience
Migration DB2 to EDB - Project Experience
EDB
 
Overcoming write availability challenges of PostgreSQL
Overcoming write availability challenges of PostgreSQL
EDB
 
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
No Time to Waste: Migrate from Oracle to EDB Postgres in Minutes
EDB
 
EDB Postgres Platform 11 Webinar
EDB Postgres Platform 11 Webinar
EDB
 
EDB Postgres & Tools in a Smart City Project
EDB Postgres & Tools in a Smart City Project
EDB
 
Remote DBA Service: Powering your DBA needs
Remote DBA Service: Powering your DBA needs
EDB
 
Les nouveautés d'EDB Postgres 11
Les nouveautés d'EDB Postgres 11
EDB
 

Similar to Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres Day (20)

Zero-to-Hero: Running Postgres in Kubernetes
Zero-to-Hero: Running Postgres in Kubernetes
EDB
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetes
t8kobayashi
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
Jimmy Angelakos
 
Kubernetes Me This Batman
Kubernetes Me This Batman
Richard Boyd, II
 
Kubernetes Me this Batman
Kubernetes Me this Batman
Sonatype
 
Cluster management with Kubernetes
Cluster management with Kubernetes
Satnam Singh
 
Introduction to Kubernetes
Introduction to Kubernetes
Vishal Biyani
 
Galera on kubernetes_no_video
Galera on kubernetes_no_video
Patrick Galbraith
 
Kubernetes
Kubernetes
Linjith Kunnon
 
Kubernetes111111111111111111122233334334
Kubernetes111111111111111111122233334334
adnansalam11
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
ssuser9b44c7
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
Kubernetes20151017a
Kubernetes20151017a
Richard Kuo
 
Kubernetes - A Rising Hero
Kubernetes - A Rising Hero
Huynh Thai Bao
 
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
Equnix Business Solutions
 
Kubernetes Immersion
Kubernetes Immersion
Juan Larriba
 
Kubernetes Internals
Kubernetes Internals
Shimi Bandiel
 
Kubernetes-introduction to kubernetes for beginers.pptx
Kubernetes-introduction to kubernetes for beginers.pptx
rathnavel194
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
DaniloQueirozMota
 
Zero-to-Hero: Running Postgres in Kubernetes
Zero-to-Hero: Running Postgres in Kubernetes
EDB
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetes
t8kobayashi
 
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC 2018 - Patroni: Kubernetes-native PostgreSQL companion
PGConf APAC
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
Jimmy Angelakos
 
Kubernetes Me this Batman
Kubernetes Me this Batman
Sonatype
 
Cluster management with Kubernetes
Cluster management with Kubernetes
Satnam Singh
 
Introduction to Kubernetes
Introduction to Kubernetes
Vishal Biyani
 
Galera on kubernetes_no_video
Galera on kubernetes_no_video
Patrick Galbraith
 
Kubernetes111111111111111111122233334334
Kubernetes111111111111111111122233334334
adnansalam11
 
Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
ssuser9b44c7
 
Kubernetes Basics - ICP Workshop Batch II
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
Kubernetes20151017a
Kubernetes20151017a
Richard Kuo
 
Kubernetes - A Rising Hero
Kubernetes - A Rising Hero
Huynh Thai Bao
 
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
Equnix Business Solutions
 
Kubernetes Immersion
Kubernetes Immersion
Juan Larriba
 
Kubernetes Internals
Kubernetes Internals
Shimi Bandiel
 
Kubernetes-introduction to kubernetes for beginers.pptx
Kubernetes-introduction to kubernetes for beginers.pptx
rathnavel194
 
stupid-simple-kubernetes-final.pdf
stupid-simple-kubernetes-final.pdf
DaniloQueirozMota
 
Ad

More from EDB (20)

Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
EDB
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
EDB
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube
EDB
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
EDB
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
EDB
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQL
EDB
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
EDB
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
EDB
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
EDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
EDB
 
IOT with PostgreSQL
IOT with PostgreSQL
EDB
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
EDB
 
Psql is awesome!
Psql is awesome!
EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
EDB
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
EDB
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
EDB
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
EDB
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
EDB
 
Migre sus bases de datos Oracle a la nube
Migre sus bases de datos Oracle a la nube
EDB
 
EFM Office Hours - APJ - July 29, 2021
EFM Office Hours - APJ - July 29, 2021
EDB
 
Benchmarking Cloud Native PostgreSQL
Benchmarking Cloud Native PostgreSQL
EDB
 
Las Variaciones de la Replicación de PostgreSQL
Las Variaciones de la Replicación de PostgreSQL
EDB
 
NoSQL and Spatial Database Capabilities using PostgreSQL
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
Is There Anything PgBouncer Can’t Do?
Is There Anything PgBouncer Can’t Do?
EDB
 
Data Analysis with TensorFlow in PostgreSQL
Data Analysis with TensorFlow in PostgreSQL
EDB
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
EDB
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
EDB
 
IOT with PostgreSQL
IOT with PostgreSQL
EDB
 
A Journey from Oracle to PostgreSQL
A Journey from Oracle to PostgreSQL
EDB
 
Psql is awesome!
Psql is awesome!
EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB 13 - New Enhancements for Security and Usability - APJ
EDB
 
Comment sauvegarder correctement vos données
Comment sauvegarder correctement vos données
EDB
 
Cloud Native PostgreSQL - Italiano
Cloud Native PostgreSQL - Italiano
EDB
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Best Practices in Security with PostgreSQL
Best Practices in Security with PostgreSQL
EDB
 
Ad

Recently uploaded (20)

FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
“Key Requirements to Successfully Implement Generative AI in Edge Devices—Opt...
Edge AI and Vision Alliance
 
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Improving Data Integrity: Synchronization between EAM and ArcGIS Utility Netw...
Safe Software
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Wenn alles versagt - IBM Tape schützt, was zählt! Und besonders mit dem neust...
Josef Weingand
 

Zero-to-hero: Running Postgres in Kubernetes, Enterprise Postgres Day

  • 1. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved. Zero to Hero Running Postgres in Kubernetes Taylor Graham : Field CTO Twitter: @thecloudslayer 1
  • 2. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.2 WHO IS RUNNING K8S ON LAPTOP?
  • 3. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.3 WHO 2019 Container Adoption Survey - Diamanti
  • 4. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.4 WHAT 2019 Container Adoption Survey - Diamanti
  • 5. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.5 WHERE 2019 Container Adoption Survey - Diamanti
  • 6. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.6 WHY • Business: Kubernetes is a system for deploying applications that can save money because it takes less IT manpower to manage and helps more efficiently utilize the infrastructure. It helps make your apps a more portable, so you can move them more easily between different clouds and internal environments or laptop to laptop. • Tech: Agility in development, deployment, and operations
  • 7. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.7 SETTING THE STAGE • K8s made for developers • K8s team cares about K8 • Who cares about the DB inside K8? GUI vs CI
  • 8. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.8 BASIC CONCEPTS
  • 9. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.9 CLUSTER • Doc: I could not find a definition. • Taylor: A Kubernetes cluster is everything.
  • 10. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.10 MASTER • DOC: The Kubernetes Master is a collection of three processes that run on a single node in your cluster, which is designated as the master node. Those processes are: kube-apiserver, kube- controller-manager and kube-scheduler.The Kubernetes master is responsible for maintaining the desired state for your cluster. • Taylor: I would call it the brains / command and control. I would think of it like vCenter coming from that world.
  • 11. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.11 CLUSTER COMMANDS Kubectl cluster-info Kubectl version
  • 12. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.12 NAMESPACE • Doc: Namespaces are a way to divide cluster resources between multiple users. Namespace provide a scope for names. Names of resources need to be unique within a namespace, but not across namespaces. Namespaces can not be nested inside one another and each Kubernetes resource can only be in one namespace. • Taylor: It’s a good way not to blow everything up ASAP.
  • 13. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.13 NAMESPACE COMMANDS helm install edb-2.4.2.tgz -f myvalues.yaml –namespace anotherfailwhale Kubectl create namespace anotherfailwhale
  • 14. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.14 NODES • Doc: A node is a worker machine in Kubernetes, previously known as a minion. A node may be a VM or physical machine, depending on the cluster. Each node contains the services necessary to run pods and is managed by the master components. The services on a node include the container runtime, kubelet and kube-proxy • Taylor: The physical server or virtual machine running all the magic.
  • 15. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.15 NODE COMMANDS CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.14 NODE COMMANDS Kubectl get nodes
  • 16. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.16 POD • Doc: A Pod is the basic execution unit of a Kubernetes application–the smallest and simplest unit in the Kubernetes object model that you create or deploy. A Pod represents processes running on your Cluster. • Taylor: Because they share a localhost with all containers in pod I think of it like docker- compose on your laptop.
  • 17. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.17 POD COMMANDS
  • 18. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.18 AND MORE POD COMMANDS kubectl describe pod
  • 19. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.19 SERVICE • Doc: a Service is an abstraction which defines a logical set of Pods and a policy by which to access them. The set of Pods targeted by a Service is usually determined by a selector. • Taylor: what the doc said….
  • 20. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.20 PV/PVC • Doc: A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. A PersistentVolumeClaim (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. • Taylor: LUN and VMDK
  • 21. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.21 PV
  • 22. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.22 DEPLOYMENT / REPLICASET • A Deployment controller provides declarative updates for Pods and ReplicaSets. • A ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods. • Taylor:
  • 23. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.23 STATEFULSET • Doc: StatefulSet is the workload API object used to manage stateful applications. Manages the deployment and scaling of a set of Pods , and provides guarantees about the ordering and uniqueness of these Pods. • Taylor: Where you run a database. Stable, unique network identifiers. $(statefulset name)-$(ordinal) Stable, persistent storage. Ordered, graceful deployment and scaling. Ordered, automated rolling updates.
  • 24. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.24 DESIGN PATTERNS
  • 25. © Copyright EnterpriseDB Corporation, 2019. All rights reserved.25 SINGLE NODE Postgres Data Application Database Stand alone Postgres server basic configuration Containers Pods
  • 26. © Copyright EnterpriseDB Corporation, 2019. All rights reserved. metrics 26 HA REFERENCE ARCHITECTURE Postgres HA Agent Proxy Mon Agent Data Application EDB-Service Postgres HA Agent Mon Agent Data Postgres HA Agent DR Tool Proxy Mon Agent Data Admin Tool read/writeredundant streaming replication streaming replication Shared or Local Storage Database, Tools, Agents Containers Pods Application Application Master Standby 2Standby 1 Proxy Postgres cluster with application scale-out Backup
  • 27. © Copyright EnterpriseDB Corporation, 2019. All rights reserved. metrics 27 On-Prem In-Memory Compute Nodes Postgres HA Agent Proxy Mon Agent EDB-Service Postgres HA Agent Mon AgentPostgres HA Agent DR Tool Proxy Mon Agent Admin Tool read/writeredundant streaming replication Database, Tools, Agents Containers Pods Master Standby 2Standby 1 Proxy NODE POOL DB PREFORMANCE NODE 2 NODE 3 Volume Claim Volume Claim Volume Claim Data Data DataBackup Nodes ApplicationApplication Application streaming replication 17k TPS PgBench
  • 28. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.28 OK LETS DEPLOY
  • 29. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.29 KUBECTL
  • 30. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.30 HELM • helm install edb-2.4.2.tgz -f myvalues.yaml
  • 31. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.31 OPENSHIFT
  • 32. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.32 RANDOM THOUGHTS
  • 33. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.33 MONITORING THOUGHTS Old way Utilization (U): The percentage of time a resource is in use. Saturation (S): The amount of work the resource must (the “queue” of work). Errors (E): A count of errors. RED methodology Rate (R): The number of requests per second. Errors (E): The number of failed requests. Duration (D): The amount of time to process a request. RED is actually derived from The Four Golden Signals Latency: The time it takes to service a request. Traffic: A measure of how much demand on the system. Errors: The rate of failed requests. Saturation: A measure of how “full” a service is, often measured by latency. OOM KILLER
  • 34. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.34 EVERYTHING ELSE
  • 35. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved. QUESTIONS & DISCUSSION 35
  • 36. CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved. THANK YOU [email protected] www.enterprisedb.com 36