-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5ddcf7
commit 02837a3
Showing
5 changed files
with
108 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*How to copy SSH keys and K8s config from Azure Linux VM](./CopyFromLinuxVM.md) | ||
|
||
Sample script for Windows using Putty tools | ||
|
||
Replace <VM_IP> with VM fqdn or IP | ||
|
||
pscp -r gab18usr@<VM_IP>:/home/gab18usr/.kube/ %USERPROFILE%/kube/ | ||
pscp -r gab18usr@<VM_IP>:/home/gab18usr/.ssh/ %USERPROFILE%/ssh/ | ||
pscp -r gab18usr@<VM_IP>:/home/gab18usr/.azure/ %USERPROFILE%/azure |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Provision AKS | ||
|
||
## 1. Login to Linux VM via ssh | ||
|
||
Use putty or ssh client. | ||
You can enable port mapping and tunner from remote port 8001 | ||
|
||
## 2. Create resource group | ||
|
||
*** This step helps to verify that only AKS service is created in the group and Azure put all related resources to aditional resource group | ||
|
||
az group create --name gab18aks --location westeurope | ||
|
||
|
||
## 3. Create AKS cluster | ||
|
||
Replace <CLUSTER_NAME> with desired unique name, i.e. gab18aks | ||
|
||
az aks create --resource-group gab18aks --name <CLUSTER_NAME> --node-count 1 --generate-ssh-keys --node-vm-size Standard_D1_v2 --dns-name-prefix <CLUSTER_NAME> | ||
|
||
|
||
Verify cluster created and version of Kubernetes | ||
|
||
az aks list -o table | ||
|
||
## 4. Get K8s keys and config | ||
|
||
az aks get-credentials --resource-group gab18aks --name <CLUSTER_NAME> | ||
|
||
az aks get-versions --location westeurope --resource-group gab18aks --name <CLUSTER_NAME> -o table | ||
|
||
|
||
## 5. Test connection to the management console | ||
|
||
kubectl get nodes | ||
|
||
|
||
## 6. Open Management Console | ||
|
||
az aks browse -n <CLUSTER_NAME> -g gab18aks | ||
|
||
|
||
|
||
|
||
## Upgrade Kubernetes cluster to version 1.9.2. | ||
*** Execute later or in case of issue with credentials | ||
|
||
* Get current version | ||
az aks list -o table | ||
|
||
* Upgrade | ||
|
||
az aks upgrade --resource-group gab18aks --name gab18aks --kubernetes-version 1.9.2 --yes | ||
|
||
|
||
* Verify | ||
|
||
az aks list -o table | ||
|
||
|
||
* Test | ||
|
||
kubectl get nodes | ||
|
||
|
||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Deploy image from Private Registry | ||
|
||
## Creating Kubernetes secret to access private registry. | ||
|
||
As example, connecting AKS to ACR using secret | ||
|
||
$query="join(' ', ['docker login $RegistryName.azurecr.io', '-u', username, '-p', passwords[0].value])" | ||
|
||
az acr credential show -n $RegistryName ` | ||
--query $query ` | ||
--output tsv ` | ||
| cmd |
This file contains 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