2023-01-07:hyper/docker-registry-web是registry的web界面工具之一。请问部署在k3s中,yaml如何写?
答案2023-01-07:
yaml如下:
apiVersion: apps/v1
kind: Deployment
metadata:labels:app: docker-registry-webname: docker-registry-webnamespace: droneci
spec:replicas: 1selector:matchLabels:app: docker-registry-webtemplate:metadata:labels:app: docker-registry-webspec:containers:- env:- name: "REGISTRY_NAME"value: "registry:5000"- name: "REGISTRY_URL"value: "http://registry:5000/v2"image: "hyper/docker-registry-web"imagePullPolicy: IfNotPresentname: docker-registry-web
---
apiVersion: v1
kind: Service
metadata:labels:app: docker-registry-webname: docker-registry-webnamespace: droneci
spec:ports:- port: 8080protocol: TCPtargetPort: 8080selector:app: docker-registry-webtype: NodePort