- make sure you're in the right folder
- start minikube
- install nginx helm chart, then run
helm upgrade --install ingress-nginx ingress-nginx
--repo https://kubernetes.github.io/ingress-nginx
--namespace ingress-nginx --create-namespace see https://kubernetes.github.io/ingress-nginx/ - install loki-stack https://github.com/grafana/helm-charts/tree/main/charts/loki-stack
helm upgrade --install loki grafana/loki-stack
--set promtail.enabled=false - install kube-prometheus-stack chart https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack then run <helm install -f prometheus-grafana-values.yml prometheus-monitoring prometheus-community/kube-prometheus-stack>
- helm install jenkins-planetarium jenkins/jenkins -f jenkins-values.yml
- apply promtail-config.yml
- apply planetarium-config.yml
- planetarium-secret.yml(command line?)
- apply planetarium-services-monitor.yml
- apply planetarium.yml
- apply ingress-service.yml
- run on different terminal.
- test the app.
- kubectl apply -f postgres-db
- create tables= kubectl exec -it pod/postgres-deployment-7cf95d7989-swcmr -c postgres -- psql -d postgres -U postgres
- helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
- helm install my-release ingress-nginx/ingress-nginx
- kubectl create clusterrolebinding cluster-admin-binding
--clusterrole cluster-admin
--user $(gcloud config get-value account) - kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.5.1/deploy/static/provider/cloud/deploy.yaml
- helm install -f prometheus-grafana-values.yml prometheus-monitoring prometheus-community/kube-prometheus-stack
- helm upgrade --install loki grafana/loki-stack #make persistent, edit file to do so.
- apply loki-pvc.yml
- kubectl edit statefulset.apps/loki
volumeMounts:
- mountPath: /tmp name: tmp
- mountPath: /etc/loki name: config
- mountPath: /data name: storage
- mountPath: /tmp/loki/ name: loki-storage
volumes:
- emptyDir: {} name: tmp
- name: config secret: defaultMode: 420 secretName: loki
- emptyDir: {} name: storage
- name: loki-storage persistentVolumeClaim: claimName: loki-pvc
-
helm install jenkins-planetarium jenkins/jenkins -f jenkins-values.yml
-
kubectl exec --namespace default -it svc/jenkins-planetarium -c jenkins -- /bin/cat /run/secrets/additional/chart-admin-password && echo
-
kubectl create clusterrolebinding jenkins-deploy
--clusterrole=cluster-admin --serviceaccount=default:jenkins-planetarium1. create pipiline 2. Build Triggers: githud hook 3. pipeline script from scm > add github repo url > /main > Script path: Jenkinsfile > uncheck Lightweight checkout. 4. go to the github repo and add wedHook: settings>Webhooks>addWebhook> http://{ip}/jenkins/github-webhook/ 5. create Jenkinsfile 6. git add, git commit, git push
- kubectl apply -f planetarium-app
- kubectl apply -f canary
- after pushing into github, jenkins should build test and deploy the planetarium and ingress service manifest to GKE.
helm upgrade [RELEASE] [CHART] [flags]