CNAME Management
Ketch allows you to manage CNAMEs at the application level.
The sections below explain in detail how you can manage an application's CNAME lifecycle.
Adding CNAME
You can add CNAME to a specific application by running the command below:
ketch cname add CNAME [flags]
Flags:
Flag | Type | Description |
---|---|---|
-a, --app | string | The name of the application |
--secure | boolean | Whether the CNAME should be accessible over HTTPS |
Certificate Generation
When you add a CNAME to an application, Ketch automatically generates a certificate for it.
Certificate Generation
Cluster issuer will be used so that HTTPS certificate can be generated when you assign a CNAME to the app deployed using Ketch and enable https access using --secure flag.
If not already present in your cluster, you can install a cluster issuer by creating the cluster-issuer-nginx.yaml file with the following content:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: le
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: my-account-key
solvers:
- http01:
ingress:
class: nginx
Replace nginx by istio or traefik to use it for ingress you plan to use.
Once the file is created, you can install it using the following command:
kubectl apply -f cluster-issuer-nginx.yaml
Removing CNAME
You can remove the CNAME from a specific application by running the command below:
ketch cname remove CNAME [flags]
Flags:
Flag | Type | Description |
---|---|---|
-a, --app | string | The name of the application |
Updated over 1 year ago