Last active
August 30, 2018 05:44
-
-
Save h3nryza/1f5c6c022c02d641aaf2056a69f3c606 to your computer and use it in GitHub Desktop.
Creating a simple Gitlab installation on a local Kubernetes installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: gitlab | |
labels: | |
name: gitlab | |
--- | |
kind: PersistentVolume | |
apiVersion: v1 | |
metadata: | |
name: gitlab-home | |
labels: | |
type: local | |
namespace: gitlab | |
spec: | |
storageClassName: slow | |
capacity: | |
storage: 5Gi | |
accessModes: | |
- ReadWriteOnce | |
hostPath: | |
path: /mnt/disks/gitlab | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: gitlab-home | |
namespace: gitlab | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
storageClassName: slow | |
resources: | |
requests: | |
storage: 5Gi | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: gitlab | |
labels: | |
app: gitlab | |
namespace: gitlab | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: gitlab | |
template: | |
metadata: | |
labels: | |
app: gitlab | |
spec: | |
volumes: | |
- name: gitlab-home | |
persistentVolumeClaim: | |
claimName: gitlab-home | |
containers: | |
- name: gitlab | |
image: gitlab/gitlab-ce | |
imagePullPolicy: Always | |
ports: | |
- containerPort: 80 | |
- containerPort: 443 | |
- containerPort: 22 | |
volumeMounts: | |
- mountPath: /etc/gitlab | |
name: gitlab-home | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: gitlab | |
name: gitlab | |
namespace: gitlab | |
spec: | |
ports: | |
- name: gitlab-http | |
port: 80 | |
protocol: TCP | |
targetPort: 80 | |
- name: gitlab-https | |
port: 443 | |
protocol: TCP | |
targetPort: 443 | |
- name: gitlab-sshac | |
port: 22 | |
protocol: TCP | |
targetPort: 22 | |
selector: | |
app: gitlab | |
type: NodePort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment