Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
/ local-argocd Public archive

Quick and dirty way to spin up argoCD in local kind k8s cluster with Kafka and helm

License

Notifications You must be signed in to change notification settings

koorikla/local-argocd

Repository files navigation

Walkthrough of k8s and ArgoCD

  • Creates local k8s cluster into Docker (kind)
  • Deploys ArgoCD operator into it
  • Sets up ArgoCD to maintain/update itself as a ArgoApp against a community maintained chart's fixed version
    • only for development enviroments
  • Deploys Strimzy Kafka operator via Argo
  • Deploys a Strimzy Kafka cluster, topic and user custom helm chart via Argo

Dependencys

Setup dependencys on osx with homebrew

  • All of the dependencys are multiplatform and can be used on osx, linux and windows, but not via homebrew

brew cask install docker

brew install kubectl kind helm k9s

helm repo add argo https://argoproj.github.io/argo-helm

helm repo update

Quick guide

  1. Install dependencys, ensure docker desktop is up and running
  2. Create a git repo, change creds in repo-and-app.yaml accoringly. In case of HTTPS auth and access token you only need to change url and token.
    • not required if you don't care about its gitops functionality yet
  3. Push the testapp chart template to git (to have a demo app to deploy).
    • it was generated by helm create testapp so its almost bare nginx with a few extra var's for demostrating ArgoCD GUI
    • you can leave just leave it to pull from my repo if you don't care about testing ArgoCD gitops functionality
  4. Run ./local-cluster.sh and follow instructions
  5. Commit a change to the testapp repository and see ArgoCD pick it up, diff is nice
    • If testing gitops

For kafka

  1. Sync Strimzy operator
  2. Sync kafka cluster, user and topic

If you want to see the full helm config options (limited in the default helm chart if not forked) you can download the chart via helm pull argo/argo-cd --version 5.19.8

Run a producer cli pod

kubectl -n strimzy-kafka run kafka-producer -ti --image=quay.io/strimzi/kafka:0.33.0-kafka-3.3.2 --rm=true --restart=Never -- bin/kafka-console-producer.sh --broker-list my-cluster-kafka-bootstrap:9092 --topic my-topic

Run a consumer pod

kubectl -n strimzy-kafka run kafka-consumer -ti --image=quay.io/strimzi/kafka:0.33.0-kafka-3.3.2 --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic my-topic --from-beginning

About

Quick and dirty way to spin up argoCD in local kind k8s cluster with Kafka and helm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published