Skip to content

Instantly share code, notes, and snippets.

Avatar

Janakiram MSV janakiramm

View GitHub Profile
View apps.yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: app
namespace: flux-system
spec:
interval: 1m
sourceRef:
kind: GitRepository
name: flux-system
View webapp-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mywebapp-ingress
namespace: mywebapp
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
View webapp-service.yaml
apiVersion: v1
kind: Service
metadata:
name: web
namespace: mywebapp
labels:
name: web
app: mywebapp
spec:
selector:
View webapp.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
namespace: mywebapp
labels:
name: web
app: mywebapp
spec:
replicas: 3
View webapp-ns.yaml
apiVersion: v1
kind: Namespace
metadata:
name: mywebapp
View infrastructure.yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: infrastructure
namespace: flux-system
spec:
interval: 1m
sourceRef:
kind: GitRepository
name: flux-system
View ingress-helm-release.yaml
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: ingress-nginx
namespace: ingress-system
spec:
interval: 5m
chart:
spec:
chart: ingress-nginx
View ingress-helm-repo.yaml
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: ingress-nginx
namespace: flux-system
spec:
interval: 30m
url: https://kubernetes.github.io/ingress-nginx
View ingress-ns.yaml
apiVersion: v1
kind: Namespace
metadata:
name: ingress-system
View bootstrap-flux.sh
OWNER=YOUR_GITHUB_USERNAME
REPO=YOUR_GITHUB_REPO
GITHUB_TOKEN=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
# Bootstrap BLR1 cluster
kubectx blr1
flux bootstrap github \
--owner=$OWNER \
--repository=$REPO \
--path=fleet/blr1 \