-
Notifications
You must be signed in to change notification settings - Fork 32
Building reliability into the K8s ACI Connector demo #103
base: master
Are you sure you want to change the base?
Changes from all commits
ac337d7
d266ac4
0e6ac07
6d88065
330e7b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,11 +31,17 @@ CLI using the instructions below. Find your subscriptionId with the | |
| az CLI: | ||
|
|
||
| Use az to create a Service Principal that can perform operations on | ||
| your resource group: | ||
| your subscription: | ||
|
|
||
| ``` | ||
| SUBSCRIPTION_ID=$(az account show | jq -r '.id') | ||
| SP_JSON=$(az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$SIMDEM_RESOURCE_GROUP") | ||
| SP_JSON=$(az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/$SUBSCRIPTION_ID") | ||
| ``` | ||
| ##Register the app | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please explain what is happening here. What is the "app" and why do we need to register it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "resource provider - A service that supplies the resources you can deploy and manage through Resource Manager. Each resource provider offers operations for working with the resources that are deployed. Some common resource providers are Microsoft.Compute, which supplies the virtual machine resource, Microsoft.Storage, which supplies the storage account resource, and Microsoft.Web, which supplies resources related to web apps." So ACI is provided through Container Instance resource manager - usually this linkage is automatic but for some people it might not be
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant can you explain it in the doc :-) Also note you have a typo here (missing space between '#' and 'Register' |
||
|
|
||
| ``` | ||
| az provider register -n Microsoft.ContainerInstance | ||
| az provider list -o table | grep ContainerInstance | ||
| ``` | ||
|
|
||
| ## Install the ACI Connector | ||
|
|
@@ -61,7 +67,7 @@ spec: | |
| spec: | ||
| containers: | ||
| - name: aci-connector | ||
| image: microsoft/aci-connector-k8s:latest | ||
| image: microsoft/aci-connector-k8s:canary | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is OK in incubator but we need to pin to a release version before we can graduate.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One day - yes |
||
| imagePullPolicy: Always | ||
| env: | ||
| - name: AZURE_CLIENT_ID | ||
|
|
@@ -88,6 +94,7 @@ kubectl get nodes | |
| ``` | ||
|
|
||
| ## Install the NGINX example | ||
| We are creating the pod from a simple yaml file. | ||
|
|
||
| ``` | ||
| cat examples/nginx-pod.yaml | ||
|
|
@@ -114,30 +121,10 @@ spec: | |
| kubectl create -f examples/nginx-pod.yaml | ||
| ``` | ||
|
|
||
| ``` | ||
| kubectl get pods -o wide | ||
| ``` | ||
|
|
||
| Since we need to ensure our Public IPs have been assigned before | ||
| proceeding, and because we need the IP number later we'll run a loop | ||
| to grab the IP once assinged. This is a little cumbersome but great if | ||
| you want to script things. If you are doing this manually you can use | ||
| `kubectl get service --wait` to display changes as they happen. | ||
|
|
||
| ``` | ||
| NGINX_IP="" | ||
| while [ -z $NGINX_IP ]; do sleep 10; NGINX_IP=$(kubectl get service vamp -o jsonpath="{.status.loadBalancer.ingress[*].ip}"); done | ||
|
||
| ``` | ||
|
|
||
| Now we have our IP: | ||
|
|
||
| ``` | ||
| echo $NGINX_IP | ||
| ``` | ||
|
|
||
| Take a look... | ||
| This command grabs the pods running on the cluster and we can see that | ||
| the Nginx pod is running on the connector which means it's running in as Azure Container Instance. | ||
|
|
||
| ``` | ||
| xdg-open $NGINX | ||
| kubectl get pods -o wide | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope this is not enough for a demo. This says it's running but it doesn't prove it is.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if it worked or not - I'll try again though |
||
| ``` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,5 @@ | |
| "ACS_RESOURCE_GROUP": "acs-k8s-test", | ||
| "ACS_CLUSTER_NAME": "acs-k8s-test", | ||
| "ACS_DNS_PREFIX": "acs-k8s-test", | ||
| "ACS_REGION": "eastus" | ||
| "ACS_REGION": "westus" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the change to West US? What is wrong with East US? |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really necessary? This is a very powerful SP.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are blocked on the dev side so gonna need this to go through for now :/ - it will stay in incubator but this is what sean is going to end up demoing @seanmck is this okay with you? - to have the sp be at the sub level for the demo...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK in incubator with a FIXME, not sure we want to be recommending it to folks though.