apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt-ca
namespace: sandbox
spec:
ca:
secretName: letsencrypt-ca
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: letsencrypt-ca
namespace: sandbox
spec:
isCA: true
commonName: osm-system
secretName: letsencrypt-ca
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
group: cert-manager.io
kubectl get secret --namespace=sandbox
NAME TYPE DATA AGE
letsencrypt-ca kubernetes.io/tls 3 Xs
kubectl get certificates --namespace=sandbox
Secure Ingress Resources With Cert Manager
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-test
annotations:
# Set up your ingress.class below (in this example, we are using nginx ingress controller)
kubernetes.io/ingress.class: "nginx"
cert-manager.io/issuer: "letsencrypt-prod"
spec:
tls:
# Replace the DOMAIN placeholder with the correct domain name
- hosts:
- DOMAIN
secretName: letsencrypt-ca
rules:
# Replace the DOMAIN placeholder with the correct domain name
- host: DOMAIN
http:
paths:
- path: /
pathType: Exact
backend:
service:
name: ingress-test
port:
number: 80
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND