Skip to content

Instantly share code, notes, and snippets.

@inc0
Created March 7, 2018 05:09
Show Gist options
  • Save inc0/6b1327c3cbcf162b9e2a6f1471110487 to your computer and use it in GitHub Desktop.
Save inc0/6b1327c3cbcf162b9e2a6f1471110487 to your computer and use it in GitHub Desktop.
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: docker-registry
name: docker-registry
spec:
replicas: 1
selector:
matchLabels:
app: docker-registry
template:
metadata:
labels:
app: docker-registry
spec:
containers:
- name: registry
image: registry:2
imagePullPolicy: Always
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: docker-registry
spec:
ports:
- name: hub
port: 80
protocol: TCP
targetPort: 5000
nodePort: 30500
selector:
app: docker-registry
type: NodePort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment