gateway-api
by nicklasfrahm
Deploy the Gateway API CRDs.
About this chart
Gateway API Helm Chart
A Helm chart for installing Gateway API Custom Resource Definitions (CRDs) in your Kubernetes cluster.
Overview
The Gateway API represents the next generation of Kubernetes Ingress, Load Balancing, and Service Mesh APIs. This Helm chart provides a simple way to install the Gateway API CRDs as a prerequisite for other Gateway API implementations.
Features
- Idempotent Installation: Safe to run multiple times without removing existing CRDs
- Version Control: Specify exact Gateway API version to install
- Channel Support: Choose between standard and experimental CRDs
- Resource Selection: Install only the CRDs you need
- Pre-install Hook: Automatically installs CRDs before other resources
Prerequisites
- Kubernetes 1.19+
- Helm 3.0+
Installation
Add the repository (if applicable)
# Add your helm repository here if published
helm repo add your-repo <repository-url>
helm repo update
Install the chart
helm install gateway-api ./charts/gateway-api
Install with custom values
helm install gateway-api ./charts/gateway-api -f custom-values.yaml
Configuration
The following table lists the configurable parameters of the gateway-api chart and their default values.
| Parameter | Description | Default |
|---|---|---|
gatewayCRDInstaller.enabled | Enable the installation of Gateway API CRDs | true |
gatewayCRDInstaller.image.repository | Container image repository for CRD installer | alpine/kubectl |
gatewayCRDInstaller.image.tag | Container image tag for CRD installer | 1.33.3 |
gatewayCRDInstaller.version | Version of Gateway API CRDs to install | 1.2.0 |
gatewayCRDInstaller.channel | Channel for CRDs (standard or experimental) | experimental |
gatewayCRDInstaller.resources | List of specific CRDs to install | See values.yaml |
Available CRDs
The chart can install the following Gateway API CRDs:
gateway.networking.k8s.io_gatewayclasses- Gateway class definitionsgateway.networking.k8s.io_gateways- Gateway resourcesgateway.networking.k8s.io_httproutes- HTTP routing rulesgateway.networking.k8s.io_referencegrants- Cross-namespace referencesgateway.networking.k8s.io_grpcroutes- gRPC routing rules (experimental)gateway.networking.k8s.io_tlsroutes- TLS routing rules (experimental)
Example Custom Values
gatewayCRDInstaller:
enabled: true
version: "1.2.0"
channel: "standard" # Use standard channel instead of experimental
image:
repository: "alpine/kubectl"
tag: "1.33.3"
resources:
- gateway.networking.k8s.io_gatewayclasses
- gateway.networking.k8s.io_gateways
- gateway.networking.k8s.io_httproutes
- gateway.networking.k8s.io_referencegrants
How it Works
This chart uses Helm hooks to install Gateway API CRDs before any other resources:
- Pre-install Hook: A Kubernetes Job runs before chart installation
- CRD Installation: The job uses
kubectlto apply Gateway API CRDs - Idempotent: Multiple runs won't conflict with existing CRDs
- Cleanup: The job is automatically cleaned up after successful completion
Upgrading
To a new chart version
helm upgrade gateway-api ./charts/gateway-api
To a new Gateway API version
Update the gatewayCRDInstaller.version value and upgrade:
gatewayCRDInstaller:
version: "1.3.0" # New version
helm upgrade gateway-api ./charts/gateway-api -f values.yaml
Uninstallation
helm uninstall gateway-api
Note: This will not remove the CRDs themselves, as they may be used by other applications. To remove CRDs manually:
kubectl delete crd gatewayclasses.gateway.networking.k8s.io
kubectl delete crd gateways.gateway.networking.k8s.io
kubectl delete crd httproutes.gateway.networking.k8s.io
kubectl delete crd referencegrants.gateway.networking.k8s.io
kubectl delete crd grpcroutes.gateway.networking.k8s.io
kubectl delete crd tlsroutes.gateway.networking.k8s.io
Troubleshooting
CRDs not installed
Check the job status:
kubectl get jobs -n <namespace>
kubectl logs job/<release-name>-gateway-crd-installer -n <namespace>
Permission issues
Ensure the service account has cluster-admin permissions to create CRDs.
Version conflicts
If you have existing Gateway API CRDs with a different version, you may need to:
- Check current CRD versions:
kubectl get crd -o custom-columns=NAME:.metadata.name,VERSION:.spec.versions[0].name | grep gateway - Plan your upgrade strategy
- Consider using
kubectl replaceinstead ofkubectl applyfor major version changes
Compatibility
| Gateway API Version | Kubernetes Version | Chart Version |
|---|---|---|
| v1.2.0 | 1.19+ | 0.1.0 |
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test the chart
- Submit a pull request
Resources
- Gateway API Documentation
- Gateway API GitHub Repository
- Gateway API Installation Guide
- Gateway API Versioning
License
This chart is licensed under the same license as the Gateway API project.
Deploy gateway-api with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gateway-api on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartgateway-api is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply