This file contains hidden or 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
| #! /bin/bash | |
| docker_username=$1 | |
| set -xe | |
| curl -sL https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64 -o /usr/local/bin/kind | |
| chmod 755 /usr/local/bin//kind | |
| curl -sL https://storage.googleapis.com/kubernetes-release/release/v1.17.4/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl | |
| chmod 755 /usr/local/bin//kubectl |
This file contains hidden or 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
| FROM nginx | |
| RUN echo 'Hello World' > /usr/share/nginx/html/index.html |
This file contains hidden or 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
| name: Docker Image CI | |
| on: [push] | |
| # Environment variables available to all jobs and steps in this workflow | |
| env: # Or as an environment variable | |
| docker_username: ${{ secrets.DOCKER_USER }} | |
| docker_password: ${{ secrets.DOCKER_PW }} | |
| jobs: |
This file contains hidden or 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
| $ cat <<EOF | kubectl apply -f - | |
| apiVersion: autoscaling.k8s.io/v1beta2 | |
| kind: VerticalPodAutoscaler | |
| metadata: | |
| name: nginx-vpa | |
| spec: | |
| targetRef: | |
| apiVersion: "apps/v1" | |
| kind: Deployment | |
| name: nginx |
This file contains hidden or 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
| $ cat <<EOF | kubectl apply -f - | |
| apiVersion: autoscaling.k8s.io/v1beta2 | |
| kind: VerticalPodAutoscaler | |
| metadata: | |
| name: nginx-vpa | |
| spec: | |
| targetRef: | |
| apiVersion: "apps/v1" | |
| kind: Deployment | |
| name: nginx |
This file contains hidden or 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
| $ cat <<EOF | kubectl apply -f - | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: nginx | |
| name: nginx | |
| spec: | |
| replicas: 2 | |
| selector: |
This file contains hidden or 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
| apiVersion: autoscaling.k8s.io/v1beta2 | |
| kind: VerticalPodAutoscaler | |
| metadata: | |
| name: nginx-vpa | |
| spec: | |
| targetRef: | |
| apiVersion: "apps/v1" | |
| kind: Deployment | |
| name: nginx | |
| updatePolicy: |
This file contains hidden or 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
| tolerations: | |
| - key: "cloud.google.com/gke-preemptible" | |
| operator: "Exists" | |
| effect: "NoSchedule" | |
| serviceAccountName: ingress-nginx | |
| terminationGracePeriodSeconds: 300 | |
| volumes: | |
| - name: webhook-cert | |
| secret: | |
| secretName: ingress-nginx-admission |
This file contains hidden or 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
| affinity: | |
| nodeAffinity: | |
| preferredDuringSchedulingIgnoredDuringExecution: | |
| - weight: 1 | |
| preference: | |
| matchExpressions: | |
| - key: cloud.google.com/gke-preemptible | |
| operator: In | |
| values: | |
| - "true" |
This file contains hidden or 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
| kubectl get node | |
| NAME STATUS ROLES AGE VERSION | |
| gke-cluster-1-default-pool-17734f1e-2zdk Ready <none> 65m v1.16.13-gke.1 | |
| gke-cluster-1-default-pool-17734f1e-dsht Ready <none> 65m v1.16.13-gke.1 | |
| gke-cluster-1-preemtible-pool-ce21ea76-mknh Ready <none> 64m v1.16.13-gke.1 | |
| gke-cluster-1-preemtible-pool-ce21ea76-zb7c Ready <none> 64m v1.16.13-gke.1 | |
| gke-cluster-1-preemtible-pool-ce21ea76-gyhe Ready <none> 4m v1.16.13-gke.1 |