Skip to content

Instantly share code, notes, and snippets.

@chrisallmark
Last active August 17, 2022 13:01
Show Gist options
  • Save chrisallmark/a4008b23894710b61967afdaf7ec79f3 to your computer and use it in GitHub Desktop.
Save chrisallmark/a4008b23894710b61967afdaf7ec79f3 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry
namespace: kube-system
spec:
replicas: 1
selector:
app: kube-registry
template:
metadata:
name: kube-registry
labels:
app: kube-registry
spec:
containers:
- name: registry
image: registry:2
resources:
limits:
cpu: 100m
memory: 200Mi
env:
- name: REGISTRY_HTTP_ADDR
value: :5000
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: /var/lib/registry
- name: REGISTRY_STORAGE_DELETE_ENABLED
value: "true"
volumeMounts:
- name: registry
mountPath: /var/lib/registry
ports:
- containerPort: 5000
nodeSelector:
node-role.kubernetes.io/master: "true"
volumes:
- name: registry
hostPath:
path: /var/lib/registry
---
apiVersion: v1
kind: Service
metadata:
name: kube-registry
namespace: kube-system
spec:
selector:
app: kube-registry
ports:
- port: 5000
targetPort: 5000
type: LoadBalancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment