Redpanda — Kubernetes Deployment Architecture

IntVerse.io
10 min readApr 28, 2023

Redpanda is a high-performance, Kafka-compatible, distributed streaming platform that is designed for modern cloud and enterprise workloads. It is gaining popularity among enterprises due to its ability to handle large volumes of data with low latency and high throughput.

In this blog, we will discuss the deployment architecture of Redpanda on Kubernetes.

Kubernetes is a powerful container orchestration platform that simplifies the deployment and management of containerized applications. It provides features like automatic scaling, self-healing, and rolling updates, which make it an ideal platform for deploying and managing distributed systems like Redpanda.

The deployment of Redpanda on Kubernetes can be broken down into multiple components:

  • Redpanda Cluster: A Redpanda cluster is a group of nodes that work together to run distributed applications and process large amounts of data. They are designed to be scalable, fault-tolerant, and highly available.
  • Redpanda Console: The Redpanda Console provides a simple and efficient way to perform administrative tasks such as creating topics, updating topic configuration, managing partitions, and monitoring the health of the cluster.
  • Storage: Redpanda cluster storage is the underlying storage system that allows a Redpanda cluster to process, store and retrieve large amounts of data efficiently. Redpanda supports a variety of storage configurations, including SSDs, NVMe, etc., to provide fast and efficient data processing. Redpanda uses the Raft protocol for replicating data, which provides fault tolerance and high availability.
  • Networking: Redpanda cluster networking in Kubernetes is managed by Kubernetes Services, which provides a stable IP address and DNS name for the Redpanda cluster, making it easy for other components in the Kubernetes cluster to communicate with the Redpanda cluster. Additionally, Kubernetes allows for the configuration of network policies, which can be used to restrict access to the Redpanda cluster from other components in the Kubernetes cluster. This helps ensure the Redpanda cluster is secure and only accessible to authorized users or components.
  • Security: Redpanda cluster security includes various measures, such as network security, access control, data encryption, and auditing. For example, Redpanda uses Transport Layer Security (TLS) encryption to secure data in transit and supports authentication and authorization using various mechanisms, such as SASL/SCRM and OAuth2.
  • Gitops: GitOps for Redpanda Cluster is an approach to managing the deployment and configuration of a Redpanda cluster using Git and declarative infrastructure-as-code (IaC) principles. The configuration of the cluster is defined as declarative IaC manifests, which are stored in a Git repository. Changes to the configuration are made through pull requests, which are reviewed and merged into the main branch of the repository. When changes are merged, the GitOps tooling automatically deploys and synchronizes the new configuration with the running Redpanda cluster.
  • Observability: Observability is a critical aspect of managing a Redpanda cluster, as it provides insights into the health and performance of the cluster, and enables administrators to optimize its configuration and capacity. Redpanda supports integration with popular logging and metrics frameworks, such as Prometheus and Grafana, to provide real-time monitoring and visualization of cluster performance and resource utilization.

Redpanda cluster:

Redpanda is an event streaming platform that is designed for high-throughput, low-latency, and reliable data processing. It is built on top of the Apache Kafka protocol and provides a compatible and performant alternative to Apache Kafka.

The Redpanda cluster consists of multiple Redpanda brokers that work together to process and store data. Each Redpanda broker in the cluster runs in a Pod, which contains the Redpanda binary, configuration files, and any other necessary files.

Redpanda Cluster can be deployed using Helm and operator based.

  • Deployment of the Redpanda cluster using Helm provides a convenient and efficient way to manage the deployment and configuration of Redpanda on Kubernetes. Users can easily customize the configuration of their Redpanda cluster and manage its lifecycle using Helm commands.
  • The Redpanda Kubernetes Operator allows users to create, scale, and manage Redpanda clusters using Kubernetes native constructs, such as deployments, services, and StatefulSets.The Redpanda Kubernetes Operator simplifies the deployment process by automating many of the manual steps required to configure and deploy Redpanda on Kubernetes. The operator manages the creation and deletion of Redpanda pods, as well as the configuration of network and storage resources.

Kubernetes provides a StatefulSet resource for deploying stateful applications like Redpanda. StatefulSet ensures that each Redpanda Pod has a unique hostname and stable network identity, which is critical for the correct functioning of the Redpanda cluster.

In addition, StatefulSet provides features like ordered deployment, scaling, and rolling updates, which simplify the management of Redpanda nodes.

Redpanda Console:

Redpanda Console is a lightweight, web-based interface that provides a graphical user interface (GUI) for managing and monitoring Redpanda clusters. Redpanda Console instances are dedicated to a cluster. You currently cannot share a single instance of Redpanda Console across multiple Redpanda clusters.

The Redpanda Console architecture consists of two main components:

  1. Frontend: The main interface of the Redpanda console. It provides an overview of the current state of the cluster, including the number of nodes, partitions, topics, and consumers. It also displays real-time metrics and statistics, such as CPU usage, network throughput, and disk space utilization.
  2. Backend: The backend is responsible for communicating with the Redpanda cluster and providing the necessary data to the web server and communication with the Redpanda cluster happens over the kafka protocol using the Redpanda client library.

Features of Redpanda Console

  • Topic management: Create, modify, and delete topics in the cluster. For example, you can manage topic partitions, replication factors, and retention policies.
  • Message Explorer: Explore topic messages through ad-hoc queries and dynamic filters. find any message using JavaScript functions to filter messages. Supported encodings are JSON, Avro, Protobuf, XML, MessagePack, Text, and Binary (hex view). The used encoding (except Protobuf) is recognized automatically.
  • Consumer group management: View consumer group offsets, reset offsets, and manage consumer group membership.
  • Cluster configuration: Manage Redpanda cluster configuration settings, including broker settings, network settings, and security settings.
  • Health checks: Monitor Health checks for individual brokers and the overall cluster, including checks for data consistency, replication lag, and broker availability.
  • User management: Manage users and their access to cluster resources, including support for authentication and authorization mechanisms such as Kerberos, SASL, and TLS client certificates.
  • Schema Registry: List all Avro, and Protobuf within your schema registry.
  • Kafka Connect: Manage connectors from multiple connect clusters, patch configs, view their current state, or restart tasks.

Redpanda Storage:

Kubernetes provides a variety of storage options, such as hostPath, emptyDir, PersistentVolumeClaim, and many more. You should choose the storage option that best suits the requirements of your application.

One popular option for storing data in Kubernetes is the Persistent Volume (PV) and Persistent Volume Claim (PVC) resources. A PV is a piece of storage in the cluster, while a PVC is a request for storage by a user. Once a PVC is created, Kubernetes will automatically provision a matching PV from the available storage options.

An XFS or ext4 file system for the data directory of Redpanda (/var/lib/redpanda/data) or the Tiered Storage cache. XFS is highly recommended. NFS is not supported.

Locally-attached NVMe devices. RAID-0 is required if you use multiple disks.

Redpanda’s multi-tiered storage support allows for efficient use of storage resources and can significantly reduce the cost of storing and processing large amounts of data. Additionally, it helps to improve performance by ensuring that frequently accessed data is stored on faster storage media, while less frequently accessed data is stored on lower-cost storage media.

Redpanda Networking:

Networking is a critical aspect of any distributed system. Kubernetes provides a built-in networking solution that enables communication between different containers and services within the cluster.

Clients can connect directly to a specific broker through its advertised address and interact with one of the broker’s APIs (Admin, Kafka, HTTP, Schema Registry & RPC).

Redpanda requires communication between each broker within the cluster, as well as communication with external clients. The clients deployed in the same cluster can connect with the Redpanda cluster via cluster headless service and external clients connecting to the redpanda cluster can connect via Kubernetes services like nodeport and load balancer.

Redpanda Security Features :

Redpanda, being a distributed streaming platform, has several security features designed to ensure data privacy, integrity, and availability. Some of the key security features of Redpanda are:

  1. Encryption: Redpanda provides encryption of data in transit, It supports TLS encryption for communication between clients and brokers, and Redpanda relies on OS to handle data encryption of data stored on disk.
  2. Authentication and Authorization: Redpanda supports multiple authentication mechanisms such as Kerberos, SASL, and TLS client certificates, and authorization mechanisms such as ACLs (Access Control Lists) and RBAC (Role-Based Access Control) for finer-grained control over user access to resources.
  3. Network Isolation: Redpanda supports network isolation to prevent unauthorized access to the cluster. It can be deployed in private subnets, and access can be restricted using security groups or firewalls.
  4. Reliable Replication: Redpanda’s replication protocol is designed to ensure data integrity and prevent data loss. It uses a combination of replication factors, leader election, and consensus algorithms to ensure that data is reliably replicated across the cluster.
  5. Secure Operations: Redpanda provides a set of tools and APIs for managing and monitoring the cluster. These tools are designed to be secure and provide fine-grained control over operations such as adding or removing brokers, changing cluster settings, and managing ACLs.

Overall, Redpanda’s features are designed to provide a secure and robust platform for distributed streaming applications. The platform takes a defense-in-depth approach to security, combining multiple layers of protection to prevent unauthorized access and ensure data privacy, integrity, and availability.

Redpanda GitOps Support:

Redpanda is a distributed streaming platform that can be deployed and managed using various deployment models, including Kubernetes. While Redpanda does not have a built-in GitOps tool, it is possible to use GitOps principles to manage Redpanda deployments and configurations.

Here are some ways in which GitOps can be used with Redpanda:

  1. Declarative Configuration: Redpanda can be configured using declarative configuration files, such as YAML files. These files can be stored in a Git repository and versioned using Git. By using GitOps principles, developers can easily manage and version the configuration files, and deploy them to Redpanda clusters using a GitOps tool like Flux or ArgoCD.
  2. Automated Deployment: With GitOps, Redpanda deployments can be automated by monitoring the Git repository for changes and deploying them automatically to the cluster. This ensures that the Redpanda cluster is always updated with the latest configurations and reduces the risk of human error.
  3. Rollbacks: GitOps provides the ability to roll back deployments to a previous state configuration if there is an issue with the new deployment. This ensures that Redpanda remains stable and reduces the risk of downtime.
  4. Multi-Cluster Management: GitOps tools like Flux and ArgoCD can manage Redpanda deployments across multiple clusters. This makes it easy to manage large-scale, distributed Redpanda deployments.

Overall, while Redpanda does not have built-in GitOps support, it can be managed and deployed using GitOps principles. This allows for automated, declarative, and versioned management of Redpanda clusters and configurations, which can improve efficiency and reduce the risk of human error.

Redpanda Observability :

In a Kubernetes environment, Redpanda can be deployed as a stateful set, and it provides observability features that can be integrated with Kubernetes observability tools such as Prometheus, Grafana, and Fluentd.

Some of the key observability features of Redpanda in a Kubernetes environment are:

  1. Metrics: Redpanda exposes various metrics that can be used to monitor the health and performance of the cluster. These metrics can be scraped by Prometheus and visualized using Grafana dashboards.
  2. Logs: Redpanda logs events and errors to standard output, which can be collected by Fluentd and stored in a centralized logging system such as Elasticsearch or Splunk. These logs can be used for troubleshooting, performance analysis, and compliance auditing.
  3. Tracing: Redpanda provides support for distributed tracing using OpenTelemetry. This allows developers to trace requests and messages as they flow through the Redpanda cluster, making it easier to identify and diagnose performance bottlenecks and errors.
  4. Alerting: Redpanda can be configured to generate alerts when specific events or conditions occur. These alerts can be sent to Slack, email, or other alerting systems, allowing operators to respond quickly to critical issues.
  5. Integration with Kubernetes API: Redpanda can be integrated with the Kubernetes API, allowing operators to manage and monitor the cluster using Kubernetes tools such as kubectl and Kubernetes Dashboard.

At IntVerse.io, we are excited to offer services for Redpanda, a modern streaming platform built for mission-critical production workloads.

Our team of experts can help your organization implement, manage, and optimize Redpanda to achieve maximum value and performance across any cloud providers and On-premises.

IntVerse.io, Redpanda services offerings include:

Consulting and Architecture Design: Our team will work with you to understand your business requirements and design an architecture that meets your specific needs. We also provide guidance on best practices for deploying and configuring Redpanda to achieve optimal performance and reliability.

Implementation and Integration: Our experts will assist with the implementation and integration of Redpanda into your existing systems and workflows. We can help you migrate data from legacy systems and ensure that your applications are properly configured to take advantage of Redpanda’s capabilities.

High Availability & Disaster Recovery Setup: IntVerse.io team helps organizations to build Redpanda multi-regional clusters and disaster recovery (DR) service offerings to help organizations ensure high availability, scalability, and data resiliency across multiple regions.

Migration Services: we understand that migrating from Confluent Platform/Cloud, Kafka, Azure Event Bus, Google PubSub, and Amazon MSK to Redpanda can be a challenging and complex process. That’s why we offer professional services to help organizations smoothly migrate from Kafka to Redpanda while minimizing downtime and ensuring data integrity.

Performance Tuning and Optimization: We can help you fine-tune Redpanda’s performance to achieve maximum throughput and low latency. Our team can work with you to optimize hardware configurations, network settings, and software configurations to ensure that Redpanda runs at peak efficiency.

Monitoring and Support: We provide ongoing monitoring and support services to ensure that Redpanda is running smoothly and performing as expected. Our team can proactively identify and address issues before they become problems, and we are available to provide support whenever you need it.

Training and Education: We offer training and education services to help your team get up to speed with Redpanda. We can provide customized training programs tailored to your specific needs, including hands-on workshops, best practices training, and more.

In conclusion, our Redpanda professional services offerings can help your organization fully leverage the power and capabilities of this modern streaming platform.

Contact us today to learn more about how we can help you achieve your business goals with the Redpanda Event Streaming Platform.

--

--

IntVerse.io

We Solve Platform & Integration Problems in the UniVerse