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-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

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐