| .config | ||
| .scripts | ||
| .templates | ||
| README.md | ||
| taskfile.yaml | ||
kube-infra
This repository contains all infrastructure components needed to run Kubernetes.
It is referenced by kube-clusters which holds the configuration for clusters.
Structure
This repository is divided into two parts:
- Components: These are the individual infrastructure components that can be used in different clusters.
- Collections: These are predefined sets of components that can be used to quickly set up a cluster.
Usage
To use components or collections from this repository, there is a script in the kube-clusters repository which let you select the components and collections you want to use in your cluster.
Optionally you can just reference the components or collections directly in your cluster configuration.
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: kube-infra-cilium
namespace: infra
spec:
interval: 5m
sourceRef:
kind: GitRepository
name: kube-infra
prune: true
path: ./components/cilium
Adding Components and Collections
To add a new component or a new collection, you first need to run the seup script via the task command.
Then you can just place the necessary Kubernetes manifests in the newly created directories.
Dont forget to reference all files in the kustomization.yaml file (e.g. with kustomize create --autodetect --recursive.)
To add a new component, run:
task add-component
To add a new collection, run:
task add-collection
The collection manifests are automatically generated. To modify a collection, just run:
task edit-collection