- local https://github.com/kubernetes-sigs/kind (or just use minikube if it works for you)
- cloud https://cloud.google.com/kubernetes-engine (for PersistentVolume and Ingress, I needed to try the real deal)
- practice environment: https://github.com/arush-sal/cka-practice-environment
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
| readinessProbe: | |
| exec: | |
| command: ["/root/grpc_health_probe", "-addr=:6666"] | |
| initialDelaySeconds: 1 | |
| livenessProbe: | |
| exec: | |
| command: ["/root/grpc_health_probe", "-addr=:6666"] | |
| initialDelaySeconds: 2 | |
| imagePullPolicy: IfNotPresent |
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
| package main | |
| // Simple, single-threaded server using system calls instead of the net library. | |
| // | |
| // Omitted features from the go net package: | |
| // | |
| // - TLS | |
| // - Most error checking | |
| // - Only supports bodies that close, no persistent or chunked connections | |
| // - Redirects |
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: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: myproject | |
| name: myproject | |
| namespace: default | |
| spec: | |
| progressDeadlineSeconds: 600 | |
| replicas: 1 |
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
| package events | |
| import ( | |
| "encoding/json" | |
| "io" | |
| "net/http" | |
| "github.com/joomcode/errorx" | |
| "github.com/nats-io/go-nats-streaming" | |
| uuid "github.com/satori/go.uuid" |
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
| ################################################### | |
| ## | |
| ## Alertmanager YAML configuration for routing. | |
| ## | |
| ## Will route alerts with a code_owner label to the slack-code-owners receiver | |
| ## configured above, but will continue processing them to send to both a | |
| ## central Slack channel (slack-monitoring) and PagerDuty receivers | |
| ## (pd-warning and pd-critical) | |
| ## |
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/sh | |
| set +e | |
| set +x | |
| NAMESPACE=restic | |
| BACKUP_FOLDER=/opt/backup/restic | |
| for dir in $(find "${BACKUP_FOLDER}" -type d -maxdepth 1 -mindepth 1); do |
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 | |
| set -e | |
| # --------- | |
| # Variables | |
| # --------- | |
| dbHost=$COCKROACH_HOST | |
| if [[ -z $dbHost ]]; then |
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
| const functions = require('firebase-functions'); | |
| const gcs = require('@google-cloud/storage')(); | |
| const spawn = require('child-process-promise').spawn; | |
| const mkdirp = require('mkdirp-promise'); | |
| const path = require('path'); | |
| const os = require('os'); | |
| const fs = require('fs'); | |
| // // Create and Deploy Your First Cloud Functions | |
| exports.optimizeImages= functions.storage.object().onFinalize((data) => { |