Skip to content

MinIO and Koperator

Cesar Celis Hernandez edited this page Aug 8, 2022 · 21 revisions

Objective:

Notify an image got uploaded via Kafka in k8s environment with Koperator and MinIO.

Steps:

  1. Create the cluster
kind delete clusters kind
kind delete clusters kind
kind create cluster --config ~/operator/testing/kind-config.yaml
  1. Install cert manager
kubectl create -f https://github.com/jetstack/cert-manager/releases/download/v1.6.2/cert-manager.yaml
  1. Install Zookeeper:
helm repo add pravega https://charts.pravega.io
helm repo update
helm install zookeeper-operator --namespace=zookeeper --create-namespace pravega/zookeeper-operator
kubectl create --namespace zookeeper -f - <<EOF
apiVersion: zookeeper.pravega.io/v1beta1
kind: ZookeeperCluster
metadata:
    name: zookeeper
    namespace: zookeeper
spec:
    replicas: 1
EOF
  1. Install Koperator:
kubectl create --validate=false -f https://github.com/banzaicloud/koperator/releases/download/v0.21.2/kafka-operator.crds.yaml
helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com/
helm repo update
helm install kafka-operator --namespace=kafka --create-namespace banzaicloud-stable/kafka-operator
  1. Create Kafka Cluster:
kubectl create -n kafka -f https://raw.githubusercontent.com/banzaicloud/koperator/master/config/samples/simplekafkacluster.yaml
  1. Create the topic:
cat << EOF | kubectl apply -n kafka -f -
apiVersion: kafka.banzaicloud.io/v1alpha1
kind: KafkaTopic
metadata:
    name: my-topic
spec:
    clusterRef:
        name: kafka
    name: my-topic
    partitions: 1
    replicationFactor: 1
    config:
        "retention.ms": "604800000"
        "cleanup.policy": "delete"
EOF
  1. Install the MinIO Operator:
kubectl apply -k ~/operator/resources
  1. Install MinIO Tenant:
kubectl apply -k ~/operator/examples/kustomization/tenant-lite
Clone this wiki locally