caddy-ingess/README.md

1.6 KiB

Caddy Ingress Controller

This is the Kubernetes Ingress Controller for Caddy. It includes functionality for monitoring Ingress resources on a Kubernetes cluster and includes support for providing automatic https certificates for all hostnames defined in ingress resources that it is managing.

Cloud Provider Setup (AWS, GCLOUD, ETC...)

In the Kubernetes folder a Helm Chart is provided to make installing the Caddy Ingress Controller on a Kubernetes cluster straight forward. To install the Caddy Ingress Controller adhere to the following steps:

  1. Create a new namespace in your cluster to isolate all Caddy resources.
  kubectl apply -f ./kubernetes/deploy/00_namespace.yaml
  1. Install the Helm Chart. (If you do not want automatic https set autotls to false and do not include your email address as a value to the helm chart.)
  helm template \
    --namespace=caddy-system ./kubernetes/helm/caddyingresscontroller/ \
    --set autotls=true \
    --set email=youremail@test.com | kubectl apply -f -

The helm chart will create a service of type LoadBalancer in the caddy-system namespace on your cluster. You'll want to set any DNS records for accessing this cluster to the external IP address of this LoadBalancer when the external IP is provisioned by your cloud provider.

You can get the external IP address with kubectl get svc -n caddy-system

Debugging

To view any logs generated by Caddy or the Ingress Controller you can view the pod logs of the Caddy Ingress Controller.

Get the pod name with:

  kubectl get pods -n caddy-system

View the pod logs:

kubectl logs <pod-name> -n caddy-system