Install Gitea on Kubernetes using kustomize, or just copy gitea.yml
and edit it before applying it
Create a kustomization.yaml
and a ingress-patch.yaml
file
# Create a kustomization.yaml file
cat <<EOF >./kustomization.yaml
namespace: gitea
bases:
- https://github.com/jefferyb/k8s-gitea.git?ref=v1.0.0
commonLabels:
app: gitea
env: production
patchesJson6902:
- path: ingress-patch.yaml
target:
group: extensions
version: v1beta1
kind: Ingress
name: gitea
EOF
# Create a ingress-patch.yaml file
cat <<EOF >./ingress-patch.yaml
- op: replace
path: /spec/rules/0/host
value: gitea.192.168.1.37.nip.io
EOF
To view the Deployment, run:
kubectl kustomize ./
To apply/deploy, run:
kubectl kustomize ./ | kubectl apply -f -
# OR
kubectl apply --kustomize ./
ref: