From 918e0169cadcc7d901c67c9be27cea37f5448822 Mon Sep 17 00:00:00 2001 From: khenidak Date: Sat, 1 Oct 2016 10:05:30 -0700 Subject: [PATCH] completed: controllers, workers + kubectl --- docs/04-kubernetes-controller.md | 29 +++++++++++++++++++++++++++++ docs/06-kubectl.md | 14 ++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/docs/04-kubernetes-controller.md b/docs/04-kubernetes-controller.md index 2807470..489d57b 100644 --- a/docs/04-kubernetes-controller.md +++ b/docs/04-kubernetes-controller.md @@ -125,6 +125,11 @@ INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" \ INTERNAL_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) ``` +#### Azure +``` +INTERNAL_IP=$(ifconfig eth0 | grep 'inet ' | cut -d: -f2 | awk '{print $1}') +``` + --- Create the systemd unit file: @@ -328,3 +333,27 @@ aws elb register-instances-with-load-balancer \ --load-balancer-name kubernetes \ --instances ${CONTROLLER_0_INSTANCE_ID} ${CONTROLLER_1_INSTANCE_ID} ${CONTROLLER_2_INSTANCE_ID} ``` + + +### Azure +``` +azure network lb probe create \ + --resource-group the-hard-way \ + --lb-name the-hard-way-clb \ + --name controller-api-server-health \ + --interval 5 \ + --port 8080 \ + --protocol http \ + --path '/healthz' + +azure network lb rule create \ + --resource-group the-hard-way \ + --lb-name the-hard-way-clb \ + --name controller-api-server \ + --frontend-port 6443 \ + --backend-port 6443 \ + --frontend-ip-name the-hard-way-cfe \ + --backend-address-pool-name backend-pool\ + --probe-name controller-api-server-health + +``` \ No newline at end of file diff --git a/docs/06-kubectl.md b/docs/06-kubectl.md index a8ed209..c4a8b4e 100644 --- a/docs/06-kubectl.md +++ b/docs/06-kubectl.md @@ -36,6 +36,20 @@ KUBERNETES_PUBLIC_ADDRESS=$(aws elb describe-load-balancers \ --load-balancer-name kubernetes | \ jq -r '.LoadBalancerDescriptions[].DNSName') ``` + +### Azure + +``` +# for this work, we are configuring kubectl on jumpbox +# The controllers are exposed via internal load balancer +# access is only allowed within the VNET +# (or ssh -L ... port 6443 .. from jumpbox to internal lb) +KUBERNETES_PUBLIC_ADDRESS=$(azure network lb show \ + --resource-group the-hard-way \ + --name the-hard-way-clb \ + --json | \ + jq -r '.frontendIPConfigurations[0].privateIPAddress') +``` --- Recall the token we setup for the admin user: