apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: docker-registry-web
name: docker-registry-web
namespace: droneci
spec:
replicas: 1
selector:
matchLabels:
app: docker-registry-web
template:
metadata:
labels:
app: docker-registry-web
spec:
containers:
- env:
- name: "REGISTRY_NAME"
value: "registry:5000"
- name: "REGISTRY_URL"
value: "http://registry:5000/v2"
image: "hyper/docker-registry-web"
imagePullPolicy: IfNotPresent
name: docker-registry-web
---
apiVersion: v1
kind: Service
metadata:
labels:
app: docker-registry-web
name: docker-registry-web
namespace: droneci
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: docker-registry-web
type: NodePort
评论