Discover Packages
github.com/pl4nty/cloudflare-kubernetes-gateway
module
Version:
v0.1.2
Opens a new window with list of versions in this module.
Published: Jan 6, 2024
License: MIT
Opens a new window with license information.
README
README
¶
Cloudflare Kubernetes Gateway
Manage Kubernetes ingress traffic with Cloudflare Tunnels via the Gateway API .
Getting Started
Install v1 or later of the Gateway API CRDs: kubectl apply -k github.com/kubernetes-sigs/gateway-api//config/crd?ref=v1.0.0
Install cloudflare-kubernetes-gateway: kubectl apply -k github.com/pl4nty/cloudflare-kubernetes-gateway//config/default
Find your Cloudflare account ID
Create a Cloudflare API token with the Account.Cloudflare Tunnel and DNS.Zone permissions
Use them to create a Secret: kubectl create secret -n cloudflare-gateway generic cloudflare --from-literal=ACCOUNT_ID=your-account-id --from-literal=TOKEN=your-token
Create a file containing your GatewayClass, then apply it with kubectl apply -f file.yaml
:
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: cloudflare
spec:
controllerName: github.com/pl4nty/cloudflare-kubernetes-gateway
parametersRef:
group: ""
kind: Secret
namespace: cloudflare-gateway
name: cloudflare
Create Gateways and HTTPRoutes to start managing traffic!
Features
The v1 Core spec is not yet supported, as some features (eg header-based routing) aren't available with Tunnels. The following features are supported:
HTTPRoute hostname and path matching
HTTPRoute Service backendRefs without filtering or weighting
Gateway gatewayClassName and listeners only
GatewayClass Core fields
Expand ▾
Collapse ▴
Directories
¶
internal
Click to show internal directories.
Click to hide internal directories.