Skip to content

Instantly share code, notes, and snippets.

@satr
Created September 20, 2021 20:53
Show Gist options
  • Save satr/a7eefd4921870af9a361ac70bf75bc4c to your computer and use it in GitHub Desktop.
Save satr/a7eefd4921870af9a361ac70bf75bc4c to your computer and use it in GitHub Desktop.
flux
#----- flux 1
fluxctl install \
--git-user=${GHUSER} \
--git-branch=main \
--git-email=${GHUSER}@users.noreply.github.com \
[email protected]:${GHUSER}/flux-get-started \
--git-path=namespaces,workloads \
--namespace=flux-system | kubectl apply -f -
export GHUSER=satr
fluxctl install \
--git-user=${GHUSER} \
--git-branch=main \
--git-email=${GHUSER}@users.noreply.github.com \
[email protected]:${GHUSER}/fluxconfig2 \
--git-path=development \
--namespace=flux-system | kubectl apply -f -
export GHUSER=satr
fluxctl install \
--git-user=${GHUSER} \
--git-branch=main \
--git-email=${GHUSER}@users.noreply.github.com \
[email protected]:${GHUSER}/fluxconfig3 \
--git-path=development \
--namespace=flux-system | kubectl apply -f -
ssh-keygen -q -N "" -f ./identity
ssh-keyscan github.com > ./known_hosts
kubectl create secret generic ssh-credentials -n flux-system \
--from-file=./identity \
--from-file=./identity.pub \
--from-file=./known_hosts
kubectl create secret generic regcred \
--from-file=.dockerconfigjson=<path/to/.docker/config.json> \
--type=kubernetes.io/dockerconfigjson
kubectl create secret generic regcred -n nginx3 \
--from-file=.dockerconfigjson=config.json \
--type=kubernetes.io/dockerconfigjson
flux delete source git [name] [flags]
#Examples
# Delete a Git repository
flux delete source git podinfo
#--------Flux 2
flux bootstrap git \
--url=ssh://git@<host>/<org>/<repository> \
--branch=<my-branch> \
--path=clusters/my-cluster
flux bootstrap git \
--url=ssh://[email protected]:satr/fluxconfig2.git \
--branch=main \
--path=development
flux bootstrap git --owner=satr --repository=fluxconfig2 --branch=main --path=development --personal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment