{"id":84,"date":"2023-12-14T23:42:31","date_gmt":"2023-12-14T23:42:31","guid":{"rendered":"https:\/\/feellikelearning.com\/en\/?p=84"},"modified":"2023-12-17T09:17:43","modified_gmt":"2023-12-17T09:17:43","slug":"use-az-command-to-provision-an-aks-cluster","status":"publish","type":"post","link":"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/","title":{"rendered":"Use az command to provision an AKS cluster"},"content":{"rendered":"\n<p>To provision an Azure Kubernetes Service (AKS) cluster using the Azure Command-Line Interface (az), you can use the following steps. Make sure you have the Azure CLI installed and authenticated before you proceed.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Open a Command Prompt or Terminal:<\/strong>\n<ul class=\"wp-block-list\">\n<li>On Windows, you can use Command Prompt or PowerShell.<\/li>\n\n\n\n<li>On Linux or macOS, use a terminal.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Login to Azure:<\/strong><br><br><code>az login<br><\/code><br><br>This command will open a browser window asking you to log in to your Azure account.<\/li>\n\n\n\n<li><strong>Set Azure Subscription (if you have multiple subscriptions):<\/strong><br><br><code>az account set --subscription &lt;subscription-id&gt;<\/code><br><br><\/li>\n\n\n\n<li><strong>Create a Resource Group:<\/strong><br><br><code>az group create --name &lt;resource-group-name&gt; --location &lt;azure-region&gt;<\/code><br><br><br>Replace &lt;resource-group-name&gt; with your desired resource group name and &lt;azure-region&gt; with the Azure region you want.<\/li>\n\n\n\n<li><strong>Create AKS Cluster:<\/strong><br><br><br><code>az aks create --resource-group &lt;resource-group-name> --name &lt;aks-cluster-name> --node-count &lt;node-count> --enable-addons monitoring --generate-ssh-keys<resource-group-name><aks-cluster-name><node-count><br><\/node-count><\/aks-cluster-name><\/resource-group-name><\/code><resource-group-name><resource-group-name><aks-cluster-name><br><br>Replace <aks-cluster-name> with your desired AKS cluster name, <node-count> with the number of nodes in your cluster, and adjust other parameters as needed.<\/node-count><\/aks-cluster-name><\/aks-cluster-name><\/resource-group-name><\/resource-group-name>\n<ul class=\"wp-block-list\">\n<li>&#8211;enable-addons monitoring: This flag enables monitoring addons.<\/li>\n\n\n\n<li>&#8211;generate-ssh-keys: This flag generates SSH keys for authentication.<br><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Configure kubectl to Use the New AKS Cluster:<\/strong><br><br><br><code>az aks get-credentials --resource-group &lt;resource-group-name&gt; --name &lt;aks-cluster-name&gt;<\/code><br><br><br>This command downloads the cluster credentials and configures kubectl to use them.<\/li>\n\n\n\n<li><strong>Verify the AKS Cluster:<\/strong><br><br><br><code>kubectl get nodes<\/code><br><br><br>This command should display the nodes in your AKS cluster.<\/li>\n<\/ul>\n\n\n\n<p>That&#8217;s it! You&#8217;ve successfully provisioned an AKS cluster using the Azure CLI. Make sure to replace the placeholder values with your specific information.<\/p>\n\n\n\n<p>To pull image from ACR (Azure Container Registry)<\/p>\n\n\n\n<p>View available ACR<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>az acr list --resource-group &lt;resource-group-name> --query \"&#91;].name\" --output table \naz acr list --query \"&#91;].{ResourceGroup:resourceGroup, ACRName:name, Subscription:subscriptionId}\" --output table\n<\/code><\/pre>\n\n\n\n<p>Authenticate AKS with ACR<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>az aks update --resource-group &lt;resource-group-name> --name &lt;aks-cluster-name> --attach-acr &lt;acr-name>\n\n<strong>Verify ACR Integration<\/strong>\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>az aks show --resource-group &lt;resource-group-name> --name &lt;aks-cluster-name> --query \"addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName\"\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To provision an Azure Kubernetes Service (AKS) cluster using the Azure Command-Line Interface (az), you can use the following steps. Make sure you have the Azure CLI installed and authenticated before you proceed. That&#8217;s it! You&#8217;ve successfully provisioned an AKS cluster using the Azure CLI. Make sure to replace the placeholder values with your specific [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Use az command to provision an AKS cluster - Feel Like Learning<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use az command to provision an AKS cluster - Feel Like Learning\" \/>\n<meta property=\"og:description\" content=\"To provision an Azure Kubernetes Service (AKS) cluster using the Azure Command-Line Interface (az), you can use the following steps. Make sure you have the Azure CLI installed and authenticated before you proceed. That&#8217;s it! You&#8217;ve successfully provisioned an AKS cluster using the Azure CLI. Make sure to replace the placeholder values with your specific [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/\" \/>\n<meta property=\"og:site_name\" content=\"Feel Like Learning\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-14T23:42:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-17T09:17:43+00:00\" \/>\n<meta name=\"author\" content=\"feellikelearning\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"feellikelearning\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/\",\"url\":\"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/\",\"name\":\"Use az command to provision an AKS cluster - Feel Like Learning\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/en\/#website\"},\"datePublished\":\"2023-12-14T23:42:31+00:00\",\"dateModified\":\"2023-12-17T09:17:43+00:00\",\"author\":{\"@id\":\"https:\/\/feellikelearning.com\/en\/#\/schema\/person\/1ec5aac313d6de20215fe2b8e176b8a7\"},\"breadcrumb\":{\"@id\":\"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/feellikelearning.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use az command to provision an AKS cluster\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/feellikelearning.com\/en\/#website\",\"url\":\"https:\/\/feellikelearning.com\/en\/\",\"name\":\"Feel Like Learning\",\"description\":\"keep curiosity alive\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/feellikelearning.com\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/feellikelearning.com\/en\/#\/schema\/person\/1ec5aac313d6de20215fe2b8e176b8a7\",\"name\":\"feellikelearning\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/feellikelearning.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/36aec9d519f02362e3e89b0716ae640d08701f57e818830f3f197db5fbc1ae20?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/36aec9d519f02362e3e89b0716ae640d08701f57e818830f3f197db5fbc1ae20?s=96&d=mm&r=g\",\"caption\":\"feellikelearning\"},\"sameAs\":[\"http:\/\/feellikelearning.com\/en\"],\"url\":\"https:\/\/feellikelearning.com\/en\/index.php\/author\/feellikelearning\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Use az command to provision an AKS cluster - Feel Like Learning","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/","og_locale":"en_US","og_type":"article","og_title":"Use az command to provision an AKS cluster - Feel Like Learning","og_description":"To provision an Azure Kubernetes Service (AKS) cluster using the Azure Command-Line Interface (az), you can use the following steps. Make sure you have the Azure CLI installed and authenticated before you proceed. That&#8217;s it! You&#8217;ve successfully provisioned an AKS cluster using the Azure CLI. Make sure to replace the placeholder values with your specific [&hellip;]","og_url":"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/","og_site_name":"Feel Like Learning","article_published_time":"2023-12-14T23:42:31+00:00","article_modified_time":"2023-12-17T09:17:43+00:00","author":"feellikelearning","twitter_card":"summary_large_image","twitter_misc":{"Written by":"feellikelearning","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/","url":"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/","name":"Use az command to provision an AKS cluster - Feel Like Learning","isPartOf":{"@id":"https:\/\/feellikelearning.com\/en\/#website"},"datePublished":"2023-12-14T23:42:31+00:00","dateModified":"2023-12-17T09:17:43+00:00","author":{"@id":"https:\/\/feellikelearning.com\/en\/#\/schema\/person\/1ec5aac313d6de20215fe2b8e176b8a7"},"breadcrumb":{"@id":"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/feellikelearning.com\/en\/index.php\/2023\/12\/14\/use-az-command-to-provision-an-aks-cluster\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/feellikelearning.com\/en\/"},{"@type":"ListItem","position":2,"name":"Use az command to provision an AKS cluster"}]},{"@type":"WebSite","@id":"https:\/\/feellikelearning.com\/en\/#website","url":"https:\/\/feellikelearning.com\/en\/","name":"Feel Like Learning","description":"keep curiosity alive","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/feellikelearning.com\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/feellikelearning.com\/en\/#\/schema\/person\/1ec5aac313d6de20215fe2b8e176b8a7","name":"feellikelearning","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/feellikelearning.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/36aec9d519f02362e3e89b0716ae640d08701f57e818830f3f197db5fbc1ae20?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/36aec9d519f02362e3e89b0716ae640d08701f57e818830f3f197db5fbc1ae20?s=96&d=mm&r=g","caption":"feellikelearning"},"sameAs":["http:\/\/feellikelearning.com\/en"],"url":"https:\/\/feellikelearning.com\/en\/index.php\/author\/feellikelearning\/"}]}},"_links":{"self":[{"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":6,"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feellikelearning.com\/en\/index.php\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}