Skip to content

firefly2442/my-flux-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

my-flux-kubernetes

My personal Kubernetes cluster using k3s, flux, renovate, and more.

Setup

Use Ansible to setup OS level applications, software, and Kubernetes deployment of k3s.

# run this once at the very beginning
# Github PAT: https://github.com/settings/tokens
# full "repo" and "admin:org" permissions seemed to be sufficient
# creates the Github repo if it doesn't exist
# creates the "flux-system" namespace in our Kubernetes cluster and some pods, see: kubectl get pods -n flux-system
# https://github.com/firefly2442/my-flux-kubernetes
export GITHUB_TOKEN=secret
flux bootstrap github --token-auth --owner=firefly2442 --repository=my-flux-kubernetes --branch=master --path=clusters/home --personal --private=false

Development Notes

pip3 install pre-commit
# lint and check all files
pre-commit run --all-files
# convert a 'ClusterIP' type to a 'LoadBalancer' type so it gets an IP address from metallb
kubectl patch svc <service-name> -n <namespace> -p '{"spec": {"type": "LoadBalancer"}}'
kubectl get svc -A

Debugging

# check the sha1 hash to whatever the latest hash is in the repo to ensure it's updating properly
kubectl get gitrepositories.source.toolkit.fluxcd.io -n flux-system
# watch it look for changes as the interval applies
flux get kustomizations --watch
# check deployments
flux -n default get hr
# to force a HelmRelease reconciliation, use suspend then resume
flux suspend hr my-helmrelease -n myhelmrelease-ns
flux resume hr my-helmrelease -n myhelmrelease-ns
kubectl describe kustomization flux-system -n flux-system

References

About

My personal Kubernetes cluster using k3s, flux, renovate, and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published