Skip to content

Instantly share code, notes, and snippets.

@gadiener
Created July 1, 2020 16:28
Show Gist options
  • Save gadiener/722985f448a9cdce5603fa2a866d59d0 to your computer and use it in GitHub Desktop.
Save gadiener/722985f448a9cdce5603fa2a866d59d0 to your computer and use it in GitHub Desktop.
Echo service useful for troubleshooting
apiVersion: v1
kind: Service
metadata:
labels:
app: echo
name: echo
spec:
ports:
- port: 8080
name: high
protocol: TCP
targetPort: 8080
- port: 80
name: low
protocol: TCP
targetPort: 8080
selector:
app: echo
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: echo
name: echo
spec:
replicas: 1
selector:
matchLabels:
app: echo
strategy: {}
template:
metadata:
labels:
app: echo
spec:
containers:
- image: gcr.io/kubernetes-e2e-test-images/echoserver:2.2
name: echo
ports:
- containerPort: 8080
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
resources: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment