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: v1 | |
kind: Pod | |
metadata: | |
labels: | |
run: nginx | |
name: nginx | |
namespace: default | |
spec: | |
containers: | |
- image: 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
apiVersion: crd.projectcalico.org/v1 | |
kind: GlobalNetworkPolicy | |
metadata: | |
name: default-deny | |
spec: | |
selector: all() | |
types: | |
- Egress | |
egress: | |
- action: Deny |
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: crd.projectcalico.org/v1 | |
kind: GlobalNetworkPolicy | |
metadata: | |
name: default-deny | |
spec: | |
selector: all() | |
types: | |
- Egress | |
egress: | |
- action: Deny |
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
NAMESPACE NAME READY STATUS | |
capi-kubeadm-bootstrap-system capi-kubeadm-bootstrap-controller-manager-6b69dc7fc8-76vjs Running | |
capi-kubeadm-control-plane-system capi-kubeadm-control-plane-controller-manager-5b8cf46bb6-wxvhg Running | |
capi-system capi-controller-manager-b9b6cf5d9-sdwzq Running | |
capi-webhook-system capi-controller-manager-cdf6fbb98-lkfvc Running | |
capi-webhook-system capi-kubeadm-bootstrap-controller-manager-7b7c457d85-zmrz6 Running | |
capi-webhook-system capi-kubeadm-control-plane-controller-manager-86c44777c5-vtdp5 Running | |
capi-webhook-system capz-controller-manager-88c95756d-87rt8 Running | |
capz-system capz-controller-manager-857dc9578d-6t7sx Running |
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 | |
#Usage: k8sbuild <ACR> <REPO> <IMAGE> <TAG> <SOURCE (path to Dockerfile, defaults to ./Dockerfile)> | |
#Example: ./k8sbuild.sh theregistry ubuntu test 0.6 | |
#Before running, create a docker-registry secret. | |
#kubectl create secret docker-registry theregistry --docker-username=${ACR} --docker-server=${ACR}.azurecr.io --docker-password="" |
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
#AKS for storage | |
az aks create -k 1.19.3 -g k8s -s Standard_B4ms -c 1 -n storage | |
az aks nodepool add -g k8s --cluster-name storage --name rook -c 0 -s Standard_B4ms --labels storage=rook | |
az vmss disk attach --vmss-name aks-rook-00821560-vmss -g MC_k8s_storage_westeurope --sku StandardSSD_LRS -z 60 --lun 0 | |
az vmss disk attach --vmss-name aks-rook-00821560-vmss -g MC_k8s_storage_westeurope --sku StandardSSD_LRS -z 60 --lun 1 | |
az aks nodepool scale -g k8s --cluster-name storage --node-count 3 -n rook |
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 expose deploy nginx --name nginx-internal --port 80 --type LoadBalancer --overrides='{ "metadata": { "annotations": { "service.beta.kubernetes.io/azure-load-balancer-internal": "true" } } } 'k |
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
( | |
set -x; cd "$(mktemp -d)" && | |
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.tar.gz" && | |
tar zxvf krew.tar.gz && | |
KREW=./krew-"$(uname | tr '[:upper:]' '[:lower:]')_$(uname -m | sed -e 's/x86_64/amd64/' -e 's/arm.*$/arm/')" && | |
"$KREW" install krew | |
) |
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
az extension add -n front-door | |
az group create -n fd | |
az network front-door create -g fd --name doorfront --backend-address 8.8.8.8 |
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 | |
#Usage: sha256url.sh <URL> | |
url=$1 | |
curl -fLs $url | tee `basename $url` | sha256sum && rm `basename $url` |