Skip to content

alzubaidi/nodejs-fluxcd

Repository files navigation

FluxCD Nodejs Example

Setup:

  • Fork this repo
  • Spin minikube cluster
  • Create namespace called "demo"
    • kubectl create namespace demo
  • Setup fluxcd on your local cluster.
    • In my case it was:
      export GHUSER="alzubaidi" # replace with your github username
      fluxctl install \
      --git-user=${GHUSER} \
      --git-email=${GHUSER}@users.noreply.github.com \
      [email protected]:${GHUSER}/nodejs-fluxcd \
      --git-path=namespaces,workloads \
      --namespace=flux | kubectl apply -f -
      
  • Forward requests from the kubernetes service to host
    • kubectl port-forward -n demo svc/hello 3000:3000
  • On a web-browser, open http://localhost:3000/