Skip to content

Instantly share code, notes, and snippets.

@sameg14
Last active November 15, 2020 15:37
Show Gist options
  • Save sameg14/b4b69618764af8b753641931fc0c1721 to your computer and use it in GitHub Desktop.
Save sameg14/b4b69618764af8b753641931fc0c1721 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: tetris
spec:
replicas: 1
template:
metadata:
labels:
app: tetris
spec:
containers:
- name: tetris
image: lrakai/tetris:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: game
labels:
app: game
spec:
selector:
# Use labels to select the pods to route traffic to
app: game
ports:
- protocol: TCP
port: 80
# Allocate a port on each node in the cluster
type: NodePort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment