Gitlab-ce for Kubernets

Gitlab-ce for Kubernets

Clone project

git clone
cd Gitlab-ce

Step by Step

Step 1 – listing labels on nodes

kubectl get nodes --show-labels
kubernetes-1   Ready    master   22d   v1.12.2,,,
kubernetes-2   Ready    node     22d   v1.12.2,,,nexusStorage=nexus,

Step 2 -Setting label on node kubernetes-2

kubectl label nodes kubernetes-2 gitlabStorage=gitlab
node/kubernetes-2 labeled

Step 3 – Create object namespaces gitlab

kubectl apply -f namespaces.yaml
namespace/gitlab created

Step 4 – Create volumes PV and PVC (etc -log – opt) Creating the /storage/gitlab directory on node kubernetes-2

mkdir -p /storage/gitlab
kubectl apply -f storage.yaml
persistentvolume/volume-gitlab-etc created
persistentvolume/volume-gitlab-log created
persistentvolume/volume-gitlab-opt created
persistentvolumeclaim/gitlab-etc created
persistentvolumeclaim/gitlab-log created
persistentvolumeclaim/gitlab-opt created

Step 5 – Create the secret opaque, report keypair (crt / key), convert to base64 – Base64Encode

kubectl apply -f secret.yaml
secret/gitlab-tls created

Step 6 – Create object deployment Define variables

kubectl apply -f deployment.yaml
deployment.extensions/gitlab created

Step 7 – Create objetct service (port 80 e 22)

kubectl apply -f service.yaml
service/gitlab-service created

Step 8 – Create object ingress Define variables

kubectl apply -f ingress.yaml
ingress.extensions/gitlab-ingress created

Step 9 – View pod logs

kubectl logs gitlab-55966b6876-mbxkb -n gitlab -f

access your browser and type enter image description hereSet new password user root enter image description here

Go to admin area

enter image description here

Go to Settings enter image description here

Disable Sign-up-restrictions

enter image description here

Save Changes

enter image description here

Gitlab-ce for Kubernets
Tagged on: