2023-01-05:konradkleine/docker-registry-frontend是registry的web界面工具之一。请问部署在k3s中,yaml如何写?
Posted 福大大架构师每日一题
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2023-01-05:konradkleine/docker-registry-frontend是registry的web界面工具之一。请问部署在k3s中,yaml如何写?相关的知识,希望对你有一定的参考价值。
2023-01-05:konradkleine/docker-registry-frontend是registry的web界面工具之一。请问部署在k3s中,yaml如何写?
答案2023-01-05:
yaml如下:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: docker-registry-frontend
name: docker-registry-frontend
namespace: droneci
spec:
replicas: 1
selector:
matchLabels:
app: docker-registry-frontend
template:
metadata:
labels:
app: docker-registry-frontend
spec:
containers:
- env:
- name: "ENV_DOCKER_REGISTRY_HOST"
value: "registry"
- name: "ENV_DOCKER_REGISTRY_PORT"
value: "5000"
image: "konradkleine/docker-registry-frontend:v2"
imagePullPolicy: IfNotPresent
name: docker-registry-frontend
---
apiVersion: v1
kind: Service
metadata:
labels:
app: docker-registry-frontend
name: docker-registry-frontend
namespace: droneci
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: docker-registry-frontend
type: NodePort
以上是关于2023-01-05:konradkleine/docker-registry-frontend是registry的web界面工具之一。请问部署在k3s中,yaml如何写?的主要内容,如果未能解决你的问题,请参考以下文章