Skip to content

dedalus-enterprise-architect/openshift-strimzi-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Strimzi Kafka OpenShift Deployment

This repository contains configuration and deployment files for running Apache Kafka on OpenShift using the Strimzi Kafka Operator.

References

Table of Contents

  1. References
  2. Table of Contents
  3. Repository Structure
  4. Concepts
  5. Prerequisites
  6. Strimzi Kafka Operator deployment
  7. Kafka Cluster
  8. Strimzi Kafka Operator uninstallation

Repository Structure

kafka/
├── README.md                  # Main documentation
├── deploy/                    # Deployment YAML files
│   ├── strimzi-values/        # Helm values files for different environments
│   │   ├── openshift-dev-example.yaml
│   │   └── openshift-prod-example.yaml
│   └── kafka-clusters/        # Additional Kafka cluster deployment examples
│       └── README.md          # Documentation for Kafka cluster deployment
├── scripts/                   # Installation and cleanup scripts
│   ├── install.sh             # Script for automated installation
│   ├── uninstall.sh           # Script for automated uninstallation
│   └── README.md             # Documentation for the install script

Concepts

Deployment

  1. Deploy the Strimzi operator in a dedicated namespace, separate from the Kafka cluster and its components, to maintain clear resource and configuration boundaries.

  2. Use a single Strimzi operator to manage all Kafka instances within the cluster, avoiding conflicts and redundancy.

  3. The Cluster Operator uses ClusterRole resources to access necessary resources, which may require cluster administrator privileges for setup.

Watch namespaces

Strimzi operators manage resources across namespaces with the following capabilities:

  • Cluster Operator: Can watch a single namespace, multiple namespaces, or all namespaces in the cluster.
  • Topic Operator and User Operator: Limited to watching a single namespace.
  • Access Operator: Can watch a single namespace or all namespaces.

Role-Based Access Control (RBAC)

Strimzi provides custom roles to delegate permissions for managing Strimzi resources:

  1. strimzi-view: Allows users to view and list Strimzi resources (aggregates into default Kubernetes view role).

  2. strimzi-admin: Grants additional permissions to create, edit, or delete Strimzi resources (aggregates into default Kubernetes edit and admin roles).

A cluster administrator can assign these roles to non-cluster administrators after deploying the Cluster Operator.

Prerequisites

  • On your Linux client
    • OpenShift client utility: oc
    • Helm client utility v3.11 or higher: helm
    • Local clone of this repo
  • On OpenShift
    • Cluster admin privileges
    • Access to quay.io registry

Strimzi Kafka Operator deployment

Manual

  1. Add the Strimzi Helm Repository

    helm repo add strimzi https://strimzi.io/charts/
    helm repo update
  2. Deploy the Strimzi Kafka Operator

    NAMESPACE=kafka-operator
    helm install strimzi-kafka-operator strimzi/strimzi-kafka-operator \
      --namespace $NAMESPACE \
      --values deploy/strimzi-values/openshift-dev-example.yaml
    
  3. Verify the Deployment

    NAMESPACE=kafka-operator
    helm status strimzi-kafka-operator -n $NAMESPACE
    oc get pods -n $NAMESPACE

Automated

The deployment process can be automated using the provided script. For additional details, please refer to the script README.

Kafka Cluster

To deploy your Kafka cluster for different use cases and customizations, refer to the examples provided in Kafka Clusters deployment.

Strimzi Kafka Operator uninstallation

You can uninstall the Strimzi Kafka Operator and related resources either manually or using the provided script.

Manual

  1. Delete Kafka Custom Resources

    NAMESPACE=kafka-operator
    oc delete kafka --all -n $NAMESPACE
  2. Uninstall the Helm Release

    NAMESPACE=kafka-operator
    helm uninstall strimzi-kafka-operator -n $NAMESPACE
  3. Delete Custom Resource Definitions (CRDs)

    oc get crds | grep kafka | awk '{print $1}' | xargs oc delete crd
  4. Delete the Namespace (Optional)

    NAMESPACE=kafka-operator
    oc delete namespace $NAMESPACE

Automated

Use the provided uninstall.sh script to automate the uninstallation process. For additional details, please refer to the script README.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages