A new interesting feature that has been released by Microsoft, with the aks-preview module, is the possibility to execute kubectl commands, directly from Azure CLI, without connecting to the cluster. The full documentation is available here: https://docs.microsoft.com/en-us/azure/aks/private-clusters#aks-run-command-preview

The first thing is to register the RunCommandPreview in your subscription:

RunCommandPreview

You can check the status of the registering, with this command:

Check the status of the registering

Check the status of the registering

When the state is Registered you need to re-register the provider ContainerService:

You can now execute your Kubernetes commands, with the following command:

Execute your Kubernetes commands

You can also apply a file:

wp-image-16854

VSAN from StarWind is software-defined storage (SDS) solution created with restricted budgets and maximum output in mind. It pulls close to 100% of IOPS from existing hardware, ensures high uptime and fault tolerance starting with just two nodes. StarWind VSAN is hypervisor and hardware agnostic, allowing you to forget about hardware restrictions and crazy expensive physical shared storage.

Build your infrastructure with off-the-shelf hardware, scale however you like, increase return on investment (ROI) and enjoy Enterprise-grade virtualization features and benefits at SMB price today!

I can now access the webpage that I deployed from the Azure CLI:

wp-image-16855

How it works? It is simple. When you execute the az aks command invoke command, a new pod is deployed in your AKS clusters, and execute the command that you passed.

At this time, this feature has some limitation like the execution with Private AKS cluster and Azure AD authentication, where it doesn’t work.

Back to blog
The following two tabs change content below.
Florent Appointaire
Florent Appointaire is Microsoft Engineer with 5 years of experience, specialized in Cloud Technologies (Public/Hybrid/Private). He is a freelance consultant in Belgium from the beginning of 2017. He is MVP Cloud and Datacentre Management. He is MCSE Private Cloud and Hyper-V certified. His favorite products are SCVMM, SCOM, Windows Azure pack/Azure Stack and Microsoft Azure.