Options:
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: coredns-custom | |
namespace: kube-system | |
data: | |
test.server: | | |
lastcoolnameleft.com:53 { | |
log | |
errors |
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
from datetime import datetime, timedelta | |
from azure.storage.blob import ( | |
BlockBlobService, | |
ContainerPermissions, | |
BlobPermissions, | |
PublicAccess, | |
) | |
AZURE_ACC_NAME = '<account_name>' | |
AZURE_PRIMARY_KEY = '<account_key>' |
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
FROM ubuntu:bionic | |
# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest#manual-install-instructions | |
# https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#linux | |
RUN apt-get update | |
RUN apt-get -y install lsb-release ca-certificates curl apt-transport-https lsb-release gnupg libssl1.0.0 libssl-dev python3-distutils python3-pip | |
# HACk! func looks for pip, not pip3 | |
RUN ln -s /usr/bin/pip3 /usr/bin/pip |
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
REG=sandboxtmf | |
az acr login -n $REG | |
# Works only on OSX. Windows uses wincred, so someone would need to figure out the equivalent | |
TOKEN=`security find-internet-password -s $REG.azurecr.io -w` | |
USER=00000000-0000-0000-0000-000000000000 | |
kubectl create secret docker-registry acr-auth --docker-server $REG.azurecr.io --docker-password=$TOKEN --docker-username=$USER | |
kubectl apply -f /tmp/deploy.yaml |
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
# Don't forget to: | |
# * Create Azure Storage Container | |
# * Create BlobFuse Secrets: kubectl create secret generic blobfusecreds --from-literal accountname=ACCOUNT-NAME --from-literal accountkey="ACCOUNT-KEY" --type="azure/blobfuse" | |
# * Deploy BlobFuse Agent on hosts: https://github.com/Azure/kubernetes-volume-drivers/tree/master/flexvolume/blobfuse#2-install-blobfuse-driver-on-every-agent-vm | |
# PV for Blob Fuse | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: pv-blobfuse-flexvol | |
spec: |
# kubectl create secret generic azure-files-secret --from-literal=azurestorageaccountname=STORAGE_ACCOUNT_NAME --from-literal=azurestorageaccountkey=STORAGE_ACCOUNT_KEY
apiVersion: v1
kind: PersistentVolume
metadata:
name: azure-files-pv
spec:
capacity:
storage: 5Gi
accessModes:
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
# kubectl create -f <(istioctl kube-inject -f <your-app-spec>.yaml) | |
kubectl apply -f <(istioctl kube-inject -f guestbook/mysql-deployment.yaml) | |
kubectl apply -f <(istioctl kube-inject -f guestbook/redis-deployment.yaml) | |
kubectl apply -f <(istioctl kube-inject -f guestbook/helloworld-deployment.yaml) | |
kubectl apply -f <(istioctl kube-inject -f guestbook/mysql-service.yaml) | |
kubectl apply -f <(istioctl kube-inject -f guestbook/redis-service.yaml) | |
kubectl apply -f <(istioctl kube-inject -f guestbook/helloworld-service.yaml) | |
kubectl apply -f <(istioctl kube-inject -f guestbook/helloworld-deployment-v2.yaml) |
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
#!/bin/bash | |
set -e | |
set -o xtrace | |
# https://stackoverflow.com/questions/8473121/execute-command-without-keeping-it-in-history | |
export HISTCONTROL=ignorespace | |
# https://www.percona.com/blog/2016/09/02/mha-quickstart-guide/ | |
# HA Proxy |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: redis-nginx | |
labels: | |
app: web | |
spec: | |
containers: | |
- name: key-value-store | |
image: redis |