I am trying to deploy a Azure ARC for Kubernetes. My Kubernetes cluster is in on prem and i want to create the Azure Arc for Kubernetes using terraform.
Using the Azure portal we have a option to Add a Kubernetes cluster with Azure ARC. Here we need to fill the RG name, Arc name, Connection type, Tags. And then we get a script to run which is az connectedk8s connect along with --name “asd” --resource-group “rgname” --location “westeurope” --correlation-id “XXX” --tags “Datacenter City StateOrDistrict CountryOrRegion”
But in the below link for terraform i don’t see the option of tags and connection. Its asking to pass public key. What does this mean?
Hi @suvarnanith , there is an example about the azurerm_arc_kubernetes_cluster, the example is doing similar things like the az connectedk8s connect command, and actually the azurerm_arc_kubernetes_cluster corresponds to Connected Cluster - Create REST API method, which only register a instance on Azure, you need to handle other steps like deploy the Azure Arc agents to the cluster and install Helm.
Hi @teowa, Thank for replying. i have below questions
azurerm_arc_kubernetes_cluster is asking for adding the public key. Which public key it is asking for?
I have a on prem cluster and to install the agent i need to run Az Connect8s connect right?
What will be the output when we run azurerm_arc_kubernetes_cluster in the terraform console and in azure portal? I am asking this question because i understand until the agent is installed the arc enabled cluster will not show up in the azure portal.
If azurerm_arc_kubernetes_cluster is same as az connectedk8s connect. How azurerm_arc_kubernetes_cluster will connect the cluster? Because az connectedk8s connect needs to be run on Vm where cluster context is set?