Skip to content

Instantly share code, notes, and snippets.

@cho0h5
Last active May 24, 2024 10:58
Show Gist options
  • Save cho0h5/5e10248bfd3966065815c1319fcc7b9e to your computer and use it in GitHub Desktop.
Save cho0h5/5e10248bfd3966065815c1319fcc7b9e to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: whoami
name: whoami
spec:
replicas: 1
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- image: traefik/whoami:latest
name: whoami
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: whoami-svc
spec:
type: ClusterIP
selector:
app: whoami
ports:
- port: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: whoami-http
annotations:
cert-manager.io/issuer: "example-issuer"
spec:
tls:
- hosts:
- your.domain.org
secretName: tls-whoami-ingress-http
rules:
- host: whoami.cho0h5.org
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: whoami-svc
port:
number: 80
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: example-issuer
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: example-issuer-account-key
solvers:
- http01:
ingress:
class: traefik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment