Skip to content

Commit

Permalink
Added API Firewall (--api-server-authorized-ip-ranges, this will rest…
Browse files Browse the repository at this point in the history
…rict API Server access to your current Public IP)
  • Loading branch information
Adeelku committed Feb 27, 2020
1 parent 4db0fe0 commit 87f8aff
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ Repo for the Azure Advent Calander 2019 Video and blog post:

Blog Post: [AKS Monitoring with Prometheus](https://atouati.com/posts/2019/12/aks-monitoring-with-prometheus/)

Youtube Video: [Azure Advent Calendar](https://www.youtube.com/watch?v=XrGN2UvVPv0&feature=youtu.be)
Youtube Video: [Adeelku on Youtube](https://youtu.be/nTLXQ_XjiQU)

**Edit 2020-02-26**
Added API Firewall (--api-server-authorized-ip-ranges, this will restrict API Server access to your current Public IP)
13 changes: 7 additions & 6 deletions scripts/create_aks.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
##!/usr/bin/env bash
### change to your desired values
LOCATION="canadacentral"
RG_NAME="AdventCalendar"
CLUSTER_NAME="aackube"
RG_NAME="aks-poc"
CLUSTER_NAME="aks-poc"
NODE_SIZE="Standard_B2s"
NODE_COUNT="2"
NODE_COUNT="1"
NODE_DISK_SIZE="30"
###
VERSION="1.15.7"
AUTH_IP=$(wget -qO- https://ipecho.net/plain ; echo)

### create the cluster
# az login
VERSION=$(az aks get-versions -l $LOCATION --query 'orchestrators[-1].orchestratorVersion' -o tsv)
az group create --name $RG_NAME --location $LOCATION
az aks create --resource-group $RG_NAME --name $CLUSTER_NAME \
--kubernetes-version $VERSION \
--location $LOCATION \
--node-vm-size $NODE_SIZE \
--load-balancer-sku standard \
--api-server-authorized-ip-ranges "${AUTH_IP}/32" \
--node-count $NODE_COUNT --node-osdisk-size $NODE_DISK_SIZE

# connect to the cluster
Expand Down
2 changes: 1 addition & 1 deletion scripts/delete_aks.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##!/usr/bin/env bash
RG_NAME="AdventCalendar" # Change to the Resource Groupe Name
RG_NAME="aks-poc" # Change to the Resource Groupe Name
echo "Deleting Resource Group $RG_NAME"
az group delete --name $RG_NAME -y
Empty file modified scripts/delete_prometheus.sh
100644 → 100755
Empty file.
Empty file modified scripts/install_prometheus.sh
100644 → 100755
Empty file.

0 comments on commit 87f8aff

Please sign in to comment.