Last active
June 21, 2021 03:17
-
-
Save akshedu/2274808686e38266920e7643f79b81f4 to your computer and use it in GitHub Desktop.
CI/CD jobs which used to create and manage a cluster via kops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Custom image with kops, kubectl and kustomize | |
image: 123456789123.dkr.ecr.ap-south-1.amazonaws.com/k8s:latest | |
stages: | |
- dryrun | |
- update | |
- roll | |
- addons | |
dryrun: | |
stage: dryrun | |
environment: staging | |
when: manual | |
script: | |
- ./dryrun.sh | |
update: | |
stage: update | |
environment: staging | |
when: manual | |
needs: | |
- dryrun | |
script: | |
- ./update.sh | |
roll: | |
stage: roll | |
environment: staging | |
when: manual | |
needs: | |
- update | |
script: | |
- kops export kubecfg --admin | |
- kops rolling-update cluster --yes | |
addons: | |
stage: addons | |
environment: staging | |
when: manual | |
needs: | |
- roll | |
script: | |
- kops export kubecfg --admin | |
- kubectl apply -f gitlab-admin-service-account.yaml | |
- kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.2.0/cert-manager.yaml | |
- kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.4/aio/deploy/recommended.yaml | |
- kubectl apply -f dashboard-admin-service-account.yaml | |
- sleep 20 | |
- kustomize build ./kubeconfig/ALB/hulk | kubectl apply -f - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment