GithubHelp home page GithubHelp logo

minikube-gitlab-tutorial's Introduction

K8s Gitlab Deployment

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

Install minikube

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/

Init minikube

#minikube start --memory 4096 --vm-driver virtualbox
#minikube start --memory 4096 --vm-driver vmwarefusion
minikube start --memory 4096 --vm-driver xhyve

Add ip to hostfile

Add these entries in your hostfile

echo $(minikube ip)" gitlab"
echo $(minikube ip)" helloworld.local"

Create ingress controller

kubectl create -f ingress

Create internal docker-registry

kubectl create -f docker-registry

Create gitlab server

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

Create gitlab runner

kubectl create -f gitlab-runner

Create test-app project

http://gitlab/projects/new

Testing App

Create deployment for this App

kubectl create -f test-app/k8s/ -R

Publishing source on gitlab

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 ..

Creation cert for local domain

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"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.