Skip to content

Instantly share code, notes, and snippets.

View ams0's full-sized avatar
🏠
Working from home

Alessandro Vozza ams0

🏠
Working from home
View GitHub Profile
kubectl apply -f https://raw.githubusercontent.com/open-policy-agent/gatekeeper/release-3.1/deploy/gatekeeper.yaml
kubectl apply -f https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-references/Kubernetes/load-balancer-no-public-ips/template.yaml
kubectl apply -f - <<EOF
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sAzureLoadBalancerNoPublicIPs
metadata:
name: load-balancer-no-public-ips
spec:
match:
excludedNamespaces: ["kube-system","ingress","istio-system"]
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: helm-manifests
spec:
destination:
name: workcluster
namespace: helm-manifests
server: ''
source:
spec:
template:
spec:
containers:
- command:
- argocd-server
- --staticassets
- /shared/app
- --insecure
name: argocd-server
#!/bin/bash
#save as install-k3d.sh
#az vm create -g k3s --image UbuntuLTS --admin-username ubuntu --ssh-key-values ~/.ssh/id_rsa.pub -n k3s --custom-data install-k3d.sh
#az network nsg rule create -g k3x --nsg-name k3xNSG --priority 1002 --access Allow --protocol Tcp --destination-port-ranges 443 -n https
#az network nsg rule create -g k3x --nsg-name k3xNSG --priority 1001 --access Allow --protocol Tcp --destination-port-ranges 80 -n http
curl https://get.docker.com/ | sh
sudo usermod -aG docker ubuntu
modules:
http_2xx:
prober: http
http:
preferred_ip_protocol: "ip4"
http_post_2xx:
prober: http
http:
method: POST
Provisioned capacity 1024GiB
Allowed IO/s: 1024
Burst IO/s: 3072
Egress Rate: 121.4 MiBytes / s
Ingress Rate: 81.0 MiBytes / s
==================
= Dbench Summary =
==================
Random Read/Write IOPS: 3247/1892. BW: 183MiB/s / 119MiB/s
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dbench
spec:
storageClassName: nfs-client
accessModes:
- ReadWriteOnce
resources:
requests:
helm upgrade --install --create-namespace -n nfs-client \
--set nfs.server="nfs4aks.privatelink.file.core.windows.net" \
--set nfs.mountOptions[0]="vers=4" \
--set nfs.mountOptions[1]="minorversion=1" \
--set nfs.mountOptions[2]="sec=sys" \
--set nfs.path="/nfs4aks/twotb" \
nfs-client-provisioner stable/nfs-client-provisioner
#!/bin/bash
RG=nfs
REGION=uksouth
ADDRESS_PREFIX_STORAGE="172.16.0.0/16"
SUBNET_PREFIX_STORAGE="172.16.10.0/24"
ADDRESS_PREFIX_AKS="172.17.0.0/16"
SUBNET_PREFIX_AKS="172.17.10.0/24"
az group create -n $RG -l $REGION
kubectl apply -f - <<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: winhd-clone
spec:
accessModes:
- ReadWriteOnce
storageClassName: managed-ultra-csi