Skip to content

Instantly share code, notes, and snippets.

@feiskyer
Created August 14, 2020 04:38
Show Gist options
  • Save feiskyer/fa6e3a153953c4f2261d94ab12a57a27 to your computer and use it in GitHub Desktop.
Save feiskyer/fa6e3a153953c4f2261d94ab12a57a27 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: echoserver
name: echoserver
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: echoserver
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: echoserver
spec:
containers:
- image: feisky/echoserver
imagePullPolicy: IfNotPresent
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
lifecycle:
preStop:
exec:
command:
- sh
- -c
- sleep 15
name: echoserver
resources: {}
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
labels:
app: echoserver
name: echoserver
namespace: default
spec:
externalTrafficPolicy: Local
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: echoserver
sessionAffinity: None
type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
labels:
app: echoserver
name: echoserver-v6
namespace: default
spec:
ipFamily: IPv6
externalTrafficPolicy: Local
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: echoserver
sessionAffinity: None
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment