Use makefile
make 01-start-minikube
make 02-ingress
make 03-docker-registry
make 04-gitlab
make 05-gitlab-runner
make 06-push-app-golang ## or 06-push-app-java
make 07-test-tag
https://github.com/kubernetes/minikube/releases
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.17.1/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
#minikube start --memory 4096 --vm-driver virtualbox
#minikube start --memory 4096 --vm-driver vmwarefusion
minikube start --memory 4096 --vm-driver xhyve
Add these entries in your hostfile
echo $(minikube ip)" gitlab"
echo $(minikube ip)" helloworld.local"
kubectl create -f ingress
kubectl create -f docker-registry
kubectl create -f gitlab
You can create secret with
kubectl create secret generic gitlab-secret --namespace gitlab --from-file=./gitlab/GITLAB_OMNIBUS_CONFIG --from-file=./gitlab/REGISTRATION_TOKEN
kubectl create -f gitlab-runner
kubectl create -f test-app/k8s/ -R
cd test-app
git init
git remote add origin http://gitlab/root/test-app.git
git add .
git commit -a -m "Initial commit"
git push -u origin master
cd ..
openssl req -new -x509 -keyout tls.key -out tls.crt -days 3650 -nodes
kubectl create secret generic local-wildcard --namespace kube-system --from-file=tls.crt="./tls.crt" \
--from-file=tls.key="./tls.key"