Skip to content

Instantly share code, notes, and snippets.

@asksven
Last active April 13, 2020 14:27
Show Gist options
  • Save asksven/224a07ca5723c60f342429f3ce42e3d2 to your computer and use it in GitHub Desktop.
Save asksven/224a07ca5723c60f342429f3ce42e3d2 to your computer and use it in GitHub Desktop.
securing-kubernetes-configuration-starting-point
kind: List
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
name: status
spec:
rules:
- host: kccss-start.yourdomain.tld
http:
paths:
- backend:
serviceName: nginx-svc
servicePort: 80
- apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
sessionAffinity: None
type: ClusterIP
- 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:
labels:
app: nginx
spec:
containers:
- image: nginx:latest
imagePullPolicy: Always
name: nginx
ports:
- containerPort: 80
protocol: TCP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment