So to continue my exercise of archiving commands I wanted to turn my attention to Azure Kubernetes (AKS). Again, this is my second time around and I managed to pretty much forget all the important commands along with the order and context. This time round I was exercising a new tool I have helped develop called dotnet-monitor, an experimental tool that makes it easier to get access to diagnostics information in a dotnet process. I will blog about this shortly.
# Loginaz login
# Show what account you have ensure it is using the correct subscriptionaz account show
# set to the correct subscription if necessaryaz account set --subscription 500f8ge0-b9fe-4e34-a233-12e5432f650h
# Execute this command at your user root e.g. c:\users\madownieaz aks get-credentials -n web-aks -g web-aks-resource-group
# Kubernets dashboard, browse to the site to a list of APIskubectl proxy
# list services (and IP address)kubectl get services
# get namespaceskubectl get namespaces
# Enable RBAC (role based access control)kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
# Deployment YAMLkubectl create -f dasblog.yml
# Update your container where in the new yaml file you just update the "image" stringkubectl apply -f dasblog.yml
# Ensures everthing is connected. Manages the cluster at the command line.kubectl cluster-info
# See the Kube UIaz aks browse --name web-aks --resource-group web-aks-resource-group
# Health of the podkubectl describe pod eshopweb-7d6ddd959d-lcxt9
# IP Address and port infokubectl get services
# list of podskubectl get pods
# port forwardkubectl port-forward pods/eshopweb-8464dc5cf6-p4m4q 7000:52323
# Log into Azure image registryaz acr login --name aks-registry
# Update an AKS cluster with ACR integrationaz aks update -n web-aks -g web-aks-resource-group --attach-acr aks-registry
Comments are closed.