Created
August 14, 2020 04:38
-
-
Save feiskyer/fa6e3a153953c4f2261d94ab12a57a27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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