Skip to content

Instantly share code, notes, and snippets.

@asksven
Created March 19, 2023 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asksven/d3ebdd47d80dd15ec9d81c77206f919d to your computer and use it in GitHub Desktop.
Save asksven/d3ebdd47d80dd15ec9d81c77206f919d to your computer and use it in GitHub Desktop.
simple statuspage for kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx-deployment
spec:
progressDeadlineSeconds: 600
replicas: 2
revisionHistoryLimit: 2
selector:
matchLabels:
app: nginx
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: nginx
spec:
containers:
- image: nginxinc/nginx-unprivileged:1.16
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 80
protocol: TCP
resources:
limits:
cpu: 100m
memory: 10Mi
requests:
cpu: 80m
memory: 4Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- NET_RAW
readOnlyRootFilesystem: true
runAsNonRoot: true
volumeMounts:
- mountPath: /tmp
name: tmp
securityContext:
fsGroup: 2000
runAsUser: 999
volumes:
- emptyDir: {}
name: tmp
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: status
spec:
ingressClassName: nginx
rules:
- host: status.asksven.local
http:
paths:
- backend:
service:
name: nginx-svc
port:
number: 80
path: /
pathType: Prefix
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
name: nginx-svc
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: nginx
sessionAffinity: None
type: ClusterIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment