chore(deployment): create issuers and use them to provision TLS certs for katbin service
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
parent
796148a341
commit
d180b8998d
@ -2,7 +2,14 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: katbin-ingress
|
name: katbin-ingress
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- testapi.katb.in
|
||||||
|
secretName: katbin-tls
|
||||||
rules:
|
rules:
|
||||||
- host: testapi.katb.in
|
- host: testapi.katb.in
|
||||||
http:
|
http:
|
||||||
|
31
deployment/ingress_nginx_svc.yml
Normal file
31
deployment/ingress_nginx_svc.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: 'true'
|
||||||
|
service.beta.kubernetes.io/do-loadbalancer-hostname: "workaround.katb.in"
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: ingress-nginx-3.23.0
|
||||||
|
app.kubernetes.io/name: ingress-nginx
|
||||||
|
app.kubernetes.io/instance: ingress-nginx
|
||||||
|
app.kubernetes.io/version: 0.44.0
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/component: controller
|
||||||
|
name: ingress-nginx-controller
|
||||||
|
namespace: ingress-nginx
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
externalTrafficPolicy: Local
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
- name: https
|
||||||
|
port: 443
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: https
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: ingress-nginx
|
||||||
|
app.kubernetes.io/instance: ingress-nginx
|
||||||
|
app.kubernetes.io/component: controller
|
19
deployment/prod_issuer.yml
Normal file
19
deployment/prod_issuer.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: ClusterIssuer
|
||||||
|
metadata:
|
||||||
|
name: letsencrypt-prod
|
||||||
|
spec:
|
||||||
|
acme:
|
||||||
|
# You must replace this email address with your own.
|
||||||
|
# Let's Encrypt will use this to contact you about expiring
|
||||||
|
# certificates, and issues related to your account.
|
||||||
|
email: amolele@gmail.com
|
||||||
|
server: https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
privateKeySecretRef:
|
||||||
|
# Secret resource that will be used to store the account's private key.
|
||||||
|
name: letsencrypt-prod
|
||||||
|
# Add a single challenge solver, HTTP01 using nginx
|
||||||
|
solvers:
|
||||||
|
- http01:
|
||||||
|
ingress:
|
||||||
|
class: nginx
|
19
deployment/staging_issuer.yml
Normal file
19
deployment/staging_issuer.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: ClusterIssuer
|
||||||
|
metadata:
|
||||||
|
name: letsencrypt-staging
|
||||||
|
spec:
|
||||||
|
acme:
|
||||||
|
# You must replace this email address with your own.
|
||||||
|
# Let's Encrypt will use this to contact you about expiring
|
||||||
|
# certificates, and issues related to your account.
|
||||||
|
email: amolele@gmail.com
|
||||||
|
server: https://acme-staging-v02.api.letsencrypt.org/directory
|
||||||
|
privateKeySecretRef:
|
||||||
|
# Secret resource that will be used to store the account's private key.
|
||||||
|
name: letsencrypt-staging
|
||||||
|
# Add a single challenge solver, HTTP01 using nginx
|
||||||
|
solvers:
|
||||||
|
- http01:
|
||||||
|
ingress:
|
||||||
|
class: nginx
|
Loading…
Reference in New Issue
Block a user