Ingress-NGINX Deployment Guide
Crater uses the Ingress-NGINX controller to manage external access to services, acting as the primary ingress point for HTTP and HTTPS traffic.
Deployment
Option 1: Without LoadBalancer (e.g., Bare Metal or Dev Clusters)
In clusters where a LoadBalancer service type is not available, we recommend enabling hostNetwork
mode.
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm upgrade --install ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--namespace ingress-nginx \
--create-namespace \
--version 4.11.3 \
--set controller.image.registry="crater-harbor.act.buaa.edu.cn/registry.k8s.io" \
--set controller.admissionWebhooks.patch.image.registry="crater-harbor.act.buaa.edu.cn/registry.k8s.io" \
--set controller.hostNetwork=true \
--set controller.dnsPolicy=ClusterFirstWithHostNet \
--set controller.healthCheckHost="10.109.80.4" \
--set 'controller.nodeSelector.kubernetes\.io/hostname=cnode1' \
--set "controller.tolerations="
🔧 Adjust node selector, tolerations, and healthCheckHost to match your cluster node configuration.
Option 2: With MetalLB (Recommended by Crater) In our production clusters, Crater uses MetalLB to allocate internal IPs in Layer 2 mode. The ingress controller is deployed as a LoadBalancer service that gets an internal IP.
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
--namespace ingress-nginx \
--create-namespace \
--version 4.11.3 \
--set controller.image.registry="crater-harbor.act.buaa.edu.cn/registry.k8s.io" \
--set controller.admissionWebhooks.patch.image.registry="crater-harbor.act.buaa.edu.cn/registry.k8s.io" \
--set controller.allowSnippetAnnotations=true
📌 This config uses an internal IP from MetalLB’s pool and supports service discovery inside a trusted network (e.g., university intranet).
You can verify the external IP assignment via:
kubectl get svc -n ingress-nginx
Example:
NAME TYPE EXTERNAL-IP PORT(S)
ingress-nginx-controller LoadBalancer 192.168.100.243 80:31234/TCP,443:31235/TCP
Version Compatibility Note
We currently pin the Ingress-NGINX version to 4.11.3
, since Crater’s ingress annotations are not yet compatible with versions ≥ 4.12.0
. Attempting to use newer versions will result in routing rewrite errors.
Uninstall
To remove the ingress controller:
helm uninstall ingress-nginx -n ingress-nginx
References
Edit on GitHubHarbor Deployment Guide
Crater relies on an internal Harbor registry to support image building, storage, and secure distribution within the cluster.
MetalLB Deployment Guide
MetalLB enables internal service exposure using Layer 2 mode for bare-metal Kubernetes clusters, ideal for private university networks.