|
1 | 1 | ---
|
2 |
| -title: How to use Service Connector in AKS |
| 2 | +title: How to use Service Connector in Azure Kubernetes Service (AKS) |
3 | 3 | description: Learn how to use Service Connector to connect AKS to other Azure services. Learn about Service Connector operations, resource management, and troubleshooting.
|
4 | 4 | author: houk-ms
|
| 5 | +ms.reviewer: malev |
5 | 6 | ms.service: service-connector
|
6 | 7 | ms.topic: how-to
|
7 | 8 | ms.date: 02/06/2025
|
@@ -127,64 +128,64 @@ The Service Connector Kubernetes extension is built on top of [Azure Arc-enabled
|
127 | 128 |
|
128 | 129 | 1. Install the `k8s-extension` Azure CLI extension.
|
129 | 130 |
|
130 |
| - ```azurecli |
131 |
| - az extension add --name k8s-extension |
132 |
| - ``` |
| 131 | + ```azurecli |
| 132 | + az extension add --name k8s-extension |
| 133 | + ``` |
133 | 134 |
|
134 | 135 | 1. Retrieve the status of the Service Connector extension. Check the `statuses` property in the command output to identify any errors.
|
135 | 136 |
|
136 |
| - ```azurecli |
137 |
| - az k8s-extension show \ |
138 |
| - --resource-group MyClusterResourceGroup \ |
139 |
| - --cluster-name MyCluster \ |
140 |
| - --cluster-type managedClusters \ |
141 |
| - --name sc-extension |
142 |
| - ``` |
| 137 | + ```azurecli |
| 138 | + az k8s-extension show \ |
| 139 | + --resource-group MyClusterResourceGroup \ |
| 140 | + --cluster-name MyCluster \ |
| 141 | + --cluster-type managedClusters \ |
| 142 | + --name sc-extension |
| 143 | + ``` |
143 | 144 |
|
144 | 145 | ### Check Kubernetes cluster logs
|
145 | 146 |
|
146 | 147 | If an error occurs during the extension installation and the error message in the `statuses` property doesn't provide sufficient information, you can further investigate by checking the Kubernetes logs with the followings steps.
|
147 | 148 |
|
148 | 149 | 1. Connect to your AKS cluster.
|
149 | 150 |
|
150 |
| - ```azurecli |
151 |
| - az aks get-credentials \ |
152 |
| - --resource-group MyClusterResourceGroup \ |
153 |
| - --name MyCluster |
154 |
| - ``` |
155 |
| -1. The Service Connector extension is installed in the `sc-system` namespace using a Helm chart. Check the namespace and the Helm release uding the following commands. |
| 151 | + ```azurecli |
| 152 | + az aks get-credentials \ |
| 153 | + --resource-group MyClusterResourceGroup \ |
| 154 | + --name MyCluster |
| 155 | + ``` |
| 156 | +1. The Service Connector extension is installed in the `sc-system` namespace using a Helm chart. Check the namespace and the Helm release using the following commands. |
156 | 157 |
|
157 | 158 | - Check the namespace exists.
|
158 | 159 |
|
159 |
| - ```Bash |
160 |
| - kubectl get ns |
161 |
| - ``` |
| 160 | + ```Bash |
| 161 | + kubectl get ns |
| 162 | + ``` |
162 | 163 |
|
163 | 164 | - Check the helm release status.
|
164 | 165 |
|
165 |
| - ```Bash |
166 |
| - helm list -n sc-system |
167 |
| - ``` |
| 166 | + ```Bash |
| 167 | + helm list -n sc-system |
| 168 | + ``` |
168 | 169 |
|
169 | 170 | 1. During the extension installation or update, a Kubernetes job called `sc-job` creates the Kubernetes resources for the service connection. A job execution failure typically causes the extension to fail. Check the job status by running the following commands. If `sc-job` doesn't exist in the `sc-system` namespace, it should have been executed successfully. This job is designed to be automatically deleted after successful execution.
|
170 | 171 |
|
171 | 172 | - Check the job exists.
|
172 | 173 |
|
173 |
| - ```Bash |
174 |
| - kubectl get job -n sc-system |
175 |
| - ``` |
| 174 | + ```Bash |
| 175 | + kubectl get job -n sc-system |
| 176 | + ``` |
176 | 177 |
|
177 | 178 | - Get the job status.
|
178 | 179 |
|
179 |
| - ```Bash |
180 |
| - kubectl describe job/sc-job -n sc-system |
181 |
| - ``` |
| 180 | + ```Bash |
| 181 | + kubectl describe job/sc-job -n sc-system |
| 182 | + ``` |
182 | 183 |
|
183 | 184 | - View the job logs.
|
184 | 185 |
|
185 |
| - ```Bash |
186 |
| - kubectl logs job/sc-job -n sc-system |
187 |
| - ``` |
| 186 | + ```Bash |
| 187 | + kubectl logs job/sc-job -n sc-system |
| 188 | + ``` |
188 | 189 |
|
189 | 190 | ### Common errors and mitigations
|
190 | 191 |
|
@@ -229,9 +230,9 @@ This error typically occurs when attempting to create a service connection while
|
229 | 230 | 1. Ensure your cluster is in a "Succeeded" state and retry the creation.
|
230 | 231 | 1. Run the following command to make sure your subscription is registered with the `Microsoft.KubernetesConfiguration` resource provider.
|
231 | 232 |
|
232 |
| - ```azurecli |
233 |
| - az provider register -n Microsoft.KubernetesConfiguration |
234 |
| - ``` |
| 233 | + ```azurecli |
| 234 | + az provider register -n Microsoft.KubernetesConfiguration |
| 235 | + ``` |
235 | 236 |
|
236 | 237 | #### Unauthorized resource access
|
237 | 238 |
|
|
0 commit comments