71 lines
1.4 KiB
YAML
71 lines
1.4 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: goplayground
|
|
namespace: goplayground
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 80
|
|
targetPort: web
|
|
name: web
|
|
selector:
|
|
app: goplayground
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: goplayground
|
|
namespace: goplayground
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: goplayground
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: goplayground
|
|
spec:
|
|
containers:
|
|
- name: web
|
|
image: x1unix/go-playground:1.15.0
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8000
|
|
name: web
|
|
resources:
|
|
limits:
|
|
memory: 20Mi
|
|
requests:
|
|
memory: 20Mi
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: goplayground
|
|
namespace: goplayground
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
kubernetes.io/ingress.class: traefik
|
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
|
ingress.kubernetes.io/ssl-redirect: "true"
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- go.cluster.fun
|
|
secretName: goplayground-ingress
|
|
rules:
|
|
- host: go.cluster.fun
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: goplayground
|
|
port:
|
|
number: 80
|
|
|