2023-01-07:hyper/docker-registry-web是registry的web界面工具之一。请问部署在k3s中,yaml如何写?

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

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

posted @ 2023-01-07 21:17  福大大架构师每日一题  阅读(12)  评论(0编辑  收藏  举报  来源