Install k3d cluster with PodSecurityPolicy with following command :
- docker
- k3d cluster
- helm
Create k3d cluster with following command
make cluster
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
kubectl create ns monitoring
helm install prometheus-chart prometheus-community/prometheus -n monitoring
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-chart ingress-nginx/ingress-nginx
kubectl apply -f deployment.yaml
kubectl apply -f ingress.yaml
- In my case, you check application on http://api.opstudio.cloud/health and
- check jenkins running on http://jenkins.opstudio.cloud/
- Install Jenkins on kubernetes cluster using helm chart
helm repo add jenkins https://charts.jenkins.io helm repo update helm install jenkins-ci jenkins/jenkins
- Create service account for jenkins with necessary permission to deploy application
- Configure github credentials in Jenkins
- Configure Dockerhub credentials in Jenkins
- Create Jenkins pipeline and Configure SCM and build pipeline using Jenkinsfile
- Write Jenkinsfile for push code in docker and deploy on kubernetes