Files
awesome-kubernetes/v2-docs/databases.md

53 KiB
Raw Blame History

Databases on Kubernetes. Database DevOps

!!! info "Architectural Context" Detailed reference for Databases on Kubernetes. Database DevOps in the context of Data & Advanced Analytics.

Standard Reference

Cluster Management

Infrastructure Provisioning

Kubernetes Operators

Data Architecture

Cloud Native Databases

OpenShift Integration

  • (2021) openshift.com: OpenShift, Databases and You: When to Put Containerized Database Workloads on OpenShift 🌟 [N/A CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — Formulates the technical decision matrix for running containerized database engines on Red Hat OpenShift. Evaluates the benefits of integrated storage management (OpenShift Data Foundation), centralized lifecycle management via Operators, and consistent security postures. Provides clarity on identifying workloads suitable for containerization versus those suited for bare metal or external VM environments.

Stateful Workloads

  • (2022) blog.crunchydata.com: Using Kubernetes? Chances Are You Need a Database 🌟 [N/A CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — Analyzes the shifting industry paradigm of running databases directly on Kubernetes platforms. Historically discouraged due to ephemeral container design, modern CSI-compliant persistent storage and operator frameworks have made containerized databases highly viable. This architectural guide assists engineering leaders in evaluating whether to leverage cloud-managed database services or orchestrate self-managed database operators within their clusters.

Cloud Services

Service Binding

  • (2022) cloud.redhat.com: Simplifying Database Cloud Service Access [N/A CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — Examines the Service Binding Specification for Kubernetes, designed to simplify database and cloud service consumption for application workloads. By standardizing secret mounting and connection variables, this mechanism reduces boilerplates and decouples application code from infrastructure bindings. Essential reading for architects designing clean, platform-agnostic cloud-native microservices.

Database Comparison

Industry Analysis

  • (2021) theregister.com: MySQL a 'pretty poor database' says departing Oracle engineer [N/A CONTENT] 🌟🌟 [COMMUNITY-TOOL] — Highlights a controversial critique of MySQL's architectural limitations and historical engineering baggage from a former Oracle database engineer. Contemplates codebase complexities, optimizer parser decisions, and transactional limitations of InnoDB compared to PostgreSQL. This serves as historical and conceptual context for RDBMS engine selection.

Relational Models

  • (2022) sqlrevisited.blogspot.com: MySQL vs PostgreSQL? Pros and Cons [N/A CONTENT] 🌟🌟 [COMMUNITY-TOOL] — Presents a balanced technical comparison of MySQL and PostgreSQL. Analyzes functional capabilities such as rich data types support (JSONB), compliance standards, procedural execution, ecosystem licensing, and community extensions. Aids developers in choosing the correct engine based on specific operational and write requirements.

Database Internals

Fundamentals

  • (2023) ==architecturenotes.co: Things You Should Know About Databases== [N/A CONTENT] [ADVANCED LEVEL] 🌟🌟🌟🌟🌟 [DE FACTO STANDARD] — An exhaustive, highly visual compendium detailing core database systems theory and mechanical sympathy. Covers indexes, transaction isolation levels (ACID), write-ahead logging (WAL), page storage, replication Topologies, and execution planners. It serves as an indispensable reference for backend architects seeking to write high-performance queries and design scalable schema topologies.

Sharding and Partitioning

  • (2023) percona.com: An Overview of Sharding in PostgreSQL and How it Relates to MongoDBs [N/A CONTENT] [ADVANCED LEVEL] 🌟🌟🌟🌟 [ENTERPRISE-STABLE] — A comparative technical analysis of database sharding architectures, contrasting native MongoDB horizontal partitioning with Postgres-based sharding methodologies. Details the mechanical trade-offs between hash, range, and zone-based partition routing. Explains how shard key selection affects query latency, transaction atomicity, and parallel execution paths.

Database Operations

Autoscaling

  • (2023) percona.com: Autoscaling Databases in Kubernetes for MongoDB, MySQL, and PostgreSQL [N/A CONTENT] [ADVANCED LEVEL] 🌟🌟🌟🌟 [ENTERPRISE-STABLE] — Explores the technical intricacies of horizontal and vertical autoscaling for stateful database engines within Kubernetes. Leveraging Custom Resource Definitions (CRDs) and specialized operators, the guide analyzes scaling mechanics for MongoDB, MySQL, and PostgreSQL. It warns of critical pitfalls such as race conditions during simultaneous CPU and storage scaling, highlighting the architectural care required to prevent split-brain issues.

CICD Protocols

  • (2022) cloudbees.com: Introductory Handbook for Database Continuous Integration [N/A CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — A foundational handbook focused on extending continuous integration (CI) and continuous delivery (CD) practices to database schemas and migrations. Explores state-based and migration-based schema management strategies using popular tools (e.g., Liquibase, Flyway) alongside Kubernetes GitOps pipelines to eliminate deployment drift and synchronize application-database releases safely.

Disaster Recovery

OpenShift Integration (1)

Distributed SQL

CockroachDB

  • (2024) ==Cockroach== [GO CONTENT] [ADVANCED LEVEL] [DOCUMENTATION] 🌟🌟🌟🌟🌟 [DE FACTO STANDARD] — Comprehensive architecture guide detailing CockroachDB deployments on Kubernetes. Evaluates how CockroachDB's cloud-native, distributed design scales horizontally and guarantees strict serializable transaction isolation. Focuses on the integration of CockroachDB's Operator with Kubernetes stateful constructs, detailing volume provisioning, network routing, and multi-region resilience.

Load Balancing

Database Proxy

  • (2022) severalnines.com: How Does a Database Load Balancer Work? [N/A CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — Demystifies the operational mechanics of database load balancers and intermediate proxies (e.g., HAProxy, ProxySQL, PgBouncer). Explores connection pooling, query routing (read/write splitting), and failover handling. Essential reading for ensuring uninterrupted service during database maintenance cycles or active-passive transitions in stateful topologies.

MongoDB

GitOps Security

  • (2023) percona.com: Storing Kubernetes Operator for Percona Server for MongoDB Secrets in Github [YAML CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — Focuses on securing the Percona Operator for MongoDB when using GitOps declarative pipelines. Walks through implementing external secret storage engines (e.g., HashiCorp Vault) and avoiding cleartext commit leaks of database administrator credentials inside GitHub. Essential reference for securing database access controls in enterprise Kubernetes pipelines.

MySQL

GitOps Orchestration

  • (2023) percona.com: MySQL on Kubernetes with GitOps 🌟 [N/A CONTENT] [ADVANCED LEVEL] 🌟🌟🌟🌟 [ENTERPRISE-STABLE] — Details the architecture for deploying and managing MySQL database instances on Kubernetes using GitOps principles. Evaluates the combination of Percona's Kubernetes Operator with GitOps controllers like ArgoCD. Demonstrates declarative management of database configurations, automated backups, and version upgrades via unified Git repositories.

Kubernetes Deployments

  • (2021) tusacentral.com: MySQL on Kubernetes demystified [N/A CONTENT] 🌟🌟 [COMMUNITY-TOOL] — A simplified walk-through detailing the containerization and deployment of MySQL within Kubernetes. Analyzes StatefulSet configurations, headless services for pod-to-pod discovery, and the essential binding of PersistentVolumeClaims (PVCs). Serves as an introductory educational guide to deconstructing the operational complexities of MySQL on Kubernetes.

Operator Orchestration

  • (2024) Percona.com: Percona Kubernetes Operator for Percona XtraDB Cluster [GO CONTENT] [ADVANCED LEVEL] [DOCUMENTATION] 🌟🌟🌟🌟 [ENTERPRISE-STABLE] — Comprehensive documentation for the Percona Operator for MySQL based on Percona XtraDB Cluster (PXC). Outlines deployment paths for highly available, multi-primary master-replica topologies. Detailing built-in continuous security scans, integrated backups, proxy routing integration, and live cluster expansion algorithms.

Performance Tuning

  • (2022) percona.com: MySQL 101: Parameters to Tune for MySQL Performance [N/A CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — A fundamental tuning guide for optimizing MySQL performance in high-throughput workloads. Analyzes the role of critical system parameters, including innodb_buffer_pool_size, innodb_log_file_size, and max_connections. Explains how allocating resources appropriately prevents memory thrashing and optimizes disk write performance.
  • (2022) percona.com: MySQL 101: How to Find and Tune a Slow SQL Query [SQL CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — A troubleshooting guide focused on tracking down and optimizing slow queries inside MySQL. Demonstrates setting up and interpreting the Slow Query Log, working with EXPLAIN and EXPLAIN ANALYZE statements, and performing targeted schema adjustments to optimize high latency queries. Helps teams maintain low application-tier response thresholds.

PostgreSQL

Architectural Patterns

  • (2023) blog.crunchydata.com: Devious SQL: Message Queuing Using Native PostgreSQL [SQL CONTENT] [ADVANCED LEVEL] 🌟🌟🌟 [COMMUNITY-TOOL] — Explores building high-throughput message queuing systems directly inside PostgreSQL using native relational primitives. Leverages FOR UPDATE SKIP LOCKED and LISTEN/NOTIFY mechanics to bypass common transactional blocking bottlenecks. A highly practical architectural design pattern that allows small-to-medium systems to delay or avoid adopting heavy middleware brokers.

Database Migration

  • (2022) blog.crunchydata.com: A Postgres Primer for Oracle DBAs [SQL CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — A comparative guide targeting Oracle database administrators transitioning to PostgreSQL. Compares procedural language engines (PL/SQL vs PL/pgSQL), transaction isolation models, dialect mappings, and process-vs-thread handling differences. Facilitates a smooth migration strategy for enterprise teams modernizing monolithic enterprise workloads.

High Availability

  • (2024) ==Patroni== 8445 [PYTHON CONTENT] [ADVANCED LEVEL] 🌟🌟🌟🌟🌟 [DE FACTO STANDARD] — Patroni is the industry-standard, template-driven Python framework for orchestrating highly available PostgreSQL clusters. Utilizing Distributed Consensus Stores (DCS) such as etcd, Consul, or ZooKeeper, Patroni automates dynamic master election, failovers, and streaming replication. It serves as the mechanical core for most enterprise PostgreSQL operators.

Indexing Strategy

  • (2022) blog.crunchydata.com: Postgres Indexes for Newbies [SQL CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — An introductory, yet technically precise primer on index designs and lookup behaviors inside PostgreSQL. Explains the operational differences between B-Tree, GIST, GIN, and BRIN index variants. Demonstrates how queries hit indexes, how to evaluate query plans, and highlights common anti-patterns like indexing columns with low selectivity.

Kernel Tuning

  • (2022) percona.com: How to Adjust Linux Out-Of-Memory Killer Settings for PostgreSQL [SHELL CONTENT] [ADVANCED LEVEL] 🌟🌟🌟🌟 [ENTERPRISE-STABLE] — A deep system engineering look at configuring the Linux Out-Of-Memory (OOM) killer settings specifically for PostgreSQL workloads. Details how Linux overcommits memory and explains how to adjust oom_score_adj to protect the postmaster daemon while allowing ephemeral worker processes to safely cycle under extreme memory pressure.

Operators

  • (2023) blog.flant.com: Comparing Kubernetes operators for PostgreSQL [N/A CONTENT] [ADVANCED LEVEL] 🌟🌟🌟🌟 [ENTERPRISE-STABLE] — A technical head-to-head comparison of major PostgreSQL Kubernetes operators, including those from CloudNativePG, Zalando, Crunchy Data, and Percona. Evaluates operators on key criteria: high availability implementation (Patroni vs native), backup management (pgBackRest vs Barman), ease of rolling upgrades, and declarative custom resource options.

Performance Optimization

  • (2022) blog.crunchydata.com: Cut Out the Middle Tier: Generating JSON Directly from Postgres [SQL CONTENT] [ADVANCED LEVEL] 🌟🌟🌟 [COMMUNITY-TOOL] — Details advanced SQL techniques to generate formatted JSON payloads directly inside PostgreSQL, eliminating the computation overhead of intermediate application-tier formatting (middle-tier data mapping). Benchmarks JSON extraction functions (e.g., jsonb_build_object, json_agg) to showcase significant throughput improvements for microservice APIs.

Query Languages

Alternative Formats

  • (2023) infoworld.com: Beyond SQL: 8 new languages for data querying [N/A CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — Surveys the landscape of alternative data querying paradigms extending beyond traditional SQL. Analyzes the syntactic and performance characteristics of modern alternatives like GraphQL, EdgeQL, PRQL, and Cypher. Explains their application domains, including graph querying, relational-object modeling, and analytical data pipeline processing.

Query Optimization

Anti-Patterns

  • (2023) vettabase.com: How slow is SELECT * ? [SQL CONTENT] 🌟🌟🌟 [COMMUNITY-TOOL] — A performance analysis exposing the architectural and mechanical cost of utilizing the wildcard 'SELECT *' query anti-pattern. Detail-oriented execution plans show the compounding overhead of disk I/O, cache pollution, network bandwidth consumption, and query planning limitations. Practical benchmarks emphasize building explicit, lean query projections.

SQL Tuning

  • (2023) geeksforgeeks.org: Best Practices for SQL Query Optimization [SQL CONTENT] 🌟🌟🌟🌟 [ENTERPRISE-STABLE] — A structured repository of industry-standard SQL query optimization practices. Outlines best practices for index utilization, avoiding wildcards, analyzing execution plans, optimizing JOIN sequences, and managing transaction scopes. Designed to assist software engineers in scaling database-backed APIs under high concurrency workloads.

Data and Databases

Database Administration

AI and MCP Clients

  • Tabularis: Open Source Desktop Client for Modern Databases with AI and MCP' Integration 2151 [SPANISH CONTENT] [ADVANCED LEVEL] [ENTERPRISE-STABLE] — An innovative, open-source cross-platform database client featuring deep AI integration and Model Context Protocol (MCP) compliance. This configuration enables language models to securely inspect, query, and mutate structured schemas under strict guardrails. Live grounding confirms the project provides localized Spanish documentation as its primary onboarding interface while keeping global compliance.

Developer Experience

Database Tooling

SQL Utilities

  • SQL Studio: A Unified SQL Database Explorer 3539 [EN CONTENT] [ENTERPRISE-STABLE] — A single-binary SQL database administrator interface written in Rust. It streamlines querying, schema inspection, and data visualization across multiple RDBMS engines (including SQLite, PostgreSQL, and MySQL) in resource-constrained containerized runtimes.

Observability

Standards and Engines

VictoriaMetrics Updates

PostgreSQL (1)

CLI and Tooling

Database Observability

Storage and Database

DBaaS

Kubernetes Operators (1)

  • (2021) percona.com: DBaaS on Kubernetes: Under the Hood 🌟 [ADVANCED LEVEL] [COMMUNITY-TOOL] — An in-depth technical dive from Percona explaining database-as-a-service (DBaaS) mechanics on Kubernetes. Evaluates custom operator reconciliation loops, persistent volume provisioning strategies, database backup triggers, and multi-node replication setups.

Market Analysis

Stateful Workloads (1)

Architectural Challenges

  • (2021) thenewstack.io: Just How Challenging Is State in Kubernetes? 🌟 [ADVANCED LEVEL] [COMMUNITY-TOOL] — A comprehensive analysis of running stateful workloads inside ephemeral Kubernetes nodes. Evaluates the persistent volume subsystem, discusses when to use custom operators versus cloud-native managed databases, and examines the overhead of local database orchestration.

💡 Explore Related: Crunchydata | Yaml | Message Queue