-
nginx ingress deploy -
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.40.2/deploy/static/provider/do/deploy.yaml
-
nginx ingress service mod install - check
Kubectl apply -f ingress-nginx/nginx-svc.yaml
-
Install cert manager from
kubectl apply -f cert-manager/cert-manager_v1.0.4.yaml
-
Get token from cloudflare for DNS resolution for obtaing ssl for wildcards *.domain.com from letsencrypt.
-
Add Cloudflare DNS access token to secret using
kubectl apply -f cert-manager/sellerspotdev.tech-cloudflare-secret.yaml
Note :
-
Install at your required namespace - usually it is suggested to wrap all the app content in a namespace other than default.
-
Replace the secret and its name as per the requirement.
-
-
Deploy issuers from
cert-manager/cert_issuers/
- it helps to issue certificates to the domains. it has both http01 and dns01 resolution issuers. consume accordingly based on the requirement.Issuer Apply Commands
**For Staging** kubectl apply -f cert-manager/cert-issuers/letsencrypt-staging.yaml kubectl apply -f cert-manager/cert-issuers/letsencrypt-staging-dns.yaml **For Production** kubectl apply -f cert-manager/cert-issuers/letsencrypt-production.yaml kubectl apply -f cert-manager/cert-issuers/letsencrypt-production-dns.yaml
Note :
-
Use staging and check whether cert_issuers works fine with above steps. - it also helps not to destroy the rate limit of production issuer from letsencrypt.
-
Apply staging issuers and deploy and test the app, once the successfull https redirection (cert assignment from letsencrypt), move it to production issuers.
-
Deploy application and Provision cert for domains via dns01 (for owner domains (wildcard domains)) and http01 (for SNI domains(customers))
-
Create specific
namespace for app
using kubectl create ns namespace_namekubectl create ns app
-
Deploy deployment and service in the names space check example from
application/deployments/
-
Install ingress for the deployed service using the refrence
application/ingress/
-
Don't forget to mention cluster_issuer name in annotations.
-
Use dns01 cluster issuer for ownerdomain and wildcards owner domains.
-
Use http01 cluster issuer for thirdparty sni domains (cross domains multi tenant).
-
Use k8s_js_client/ node client kubernets client application to automate the ingress deployment.
-
This should be deployed as a pod and exposed to the world with authentication to add dynamic ingress to the application.
-
Which provisions the tls cert for 3rd party domains (sni) on the go.
-
Using the same js k8s_js_client the ingress can be deleted on the go.
( It helps to delete the cert and secrete associated with the ingress for that particular domain, it also prevents from ratelimiting on letsencrypt , thus we don't want to renew cert for the churned customer ).
- ssl and ingress application of thirdparty customers(domains) should be handled carefully, and it needs to be streamlined, all edge cases needs to be handled.