Skip to content

Various helpful docs and bash scripts for Kubernetes and Docker deployments

Michael Tarng edited this page Jan 30, 2019 · 22 revisions

Various helpful docs and bash scripts for Kubernetes and Docker deployments

Azure CLI

Creating an AKS Cluster

Samples:

az aks create --resource-group <resource-group> --name <aks-cluster-name> --node-count 1 --service-principal <service-principal-guid> --client-secret <secret-guid> --generate-ssh-keys

az aks get-credentials --resource-group <resource-group> --name <aks-cluster-name>

Kubectl

Kubectl Cheat Sheet

Kubectl Overview

Kubectl References and Commands

Useful commands:

alias k='kubectl'

k config view

k get services

k describe pod <pod-name-or-prefix>

k logs <pod-name>

k port-forward <pod-name> 8080:8080

k apply -f deployment.yaml

k delete -f deployment.yaml

k exec -it <pod-name> -- sh

Connecting to a Private Container Registry

Azure Container Registry Documentation

Create through Azure Cli

Create through Azure Portal


kubectl create secret docker-registry <regcred-name> --docker-server=<repository-url> --docker-username <rbac-appId> --docker-password <rbac-password>

kubectl get secret <regcred-name> --output="jsonpath={.data.\.dockerconfigjson}" | base64 --decode

kubectl get secret <regcred-name> --output=yaml

Clone this wiki locally