欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

2022-02-13:k8s安装gitlab,yaml如何写?

时间:2023-06-17

2022-02-13:k8s安装gitlab,yaml如何写?

答案2022-02-13:

yaml如下:

apiVersion: apps/v1kind: Deploymentmetadata: labels: app: gitlab name: gitlab namespace: moonfddspec: replicas: 1 selector: matchLabels: app: gitlab template: metadata: labels: app: gitlab spec: containers: - image: 'gitlab/gitlab-ce' imagePullPolicy: IfNotPresent name: gitlab securityContext: privileged: true volumeMounts: - mountPath: /etc/gitlab name: volv1 - mountPath: /var/log/gitlab name: volv2 - mountPath: /var/opt/gitlab name: volv3 volumes: - hostPath: path: /root/k8s/moonfdd/gitlab/etc/gitlab type: DirectoryOrCreate name: volv1 - hostPath: path: /root/k8s/moonfdd/gitlab/var/log/gitlab type: DirectoryOrCreate name: volv2 - hostPath: path: /root/k8s/moonfdd/gitlab/var/opt/gitlab type: DirectoryOrCreate name: volv3---apiVersion: v1kind: Servicemetadata: labels: app: gitlab name: gitlab namespace: moonfddspec: ports: - port: 80 protocol: TCP targetPort: 80 selector: app: gitlab type: NodePort

结果如下:


gitlab的yaml

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。