Skip to content

Instantly share code, notes, and snippets.

@tasdikrahman
Last active June 26, 2020 15:44
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 tasdikrahman/c1f6ddf998572e720be45b126a4cd0f8 to your computer and use it in GitHub Desktop.
Save tasdikrahman/c1f6ddf998572e720be45b126a4cd0f8 to your computer and use it in GitHub Desktop.
# borrowed and modified from https://github.com/shelleg/kubernetes-101
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ping-server
name: ping-server
spec:
replicas: 2
selector:
matchLabels:
app: ping-server
template:
metadata:
labels:
app: ping-server
spec:
containers:
- image: shelleg/demo-nodejs-http-server
imagePullPolicy: Always
name: ping-server
ports:
- containerPort: 8080
protocol: TCP
apiVersion: v1
kind: Service
metadata:
labels:
app: ping-server
name: ping-server
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
run: ping-server
clusterIP: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment