rackctl SSL and IngressThis guide walks through deploying an example web app accessible at http://app1.dev.example.com/example using Kubernetes, rackctl for SSL management, and NGINX Ingress.
rackctlUse the following command to provision SSL for your domain:
rackctl gen-ssl app1.dev.example.com
Note: SSL termination is handled entirely by the rackctl system. Do not configure SSL-related annotations in your Kubernetes Ingress.
Create an ingress file named ingress.yaml:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-prod
namespace: default
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" # 1 hour timeout
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" # 1 hour timeout
nginx.ingress.kubernetes.io/proxy-connect-timeout: "60" # 60 seconds
nginx.ingress.kubernetes.io/enable-websocket: "true" # WebSocket support
nginx.ingress.kubernetes.io/proxy-body-size: "0"
spec:
ingressClassName: nginx
rules:
- host: app1.dev.example.com
http:
paths:
- path: /example
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
Save the following as example-app/deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deploy
labels:
app: example-app
spec:
replicas: 2
selector:
matchLabels:
app: example-app
template:
metadata:
labels:
app: example-app
spec:
containers:
- name: example-app
image: docker.io/gingersociety/example-service
ports:
- containerPort: 80
Save the following as example-app/service.yaml:
apiVersion: v1
kind: Service
metadata:
name: example-service
labels:
app: example-app
spec:
selector:
app: example-app
ports:
- protocol: TCP
name: http
port: 80
targetPort: 80
Apply the Kubernetes resources:
kubectl apply -f example-app/deployment.yaml
kubectl apply -f example-app/service.yaml
kubectl apply -f ingress.yaml
Once deployed and ingress is applied, access the app in your browser:
https://app1.dev.example.com/example
rackctl system — Kubernetes Ingress does not need to manage certificates.app1.dev.example.com to the load balancer IP of your ingress controller.kubectl logs -n ingress-nginx <ingress-controller-pod-name>.