Skip to content

Commit 1e8fd13

Browse files
Merge pull request #248499 from dramasamy/tsv
Use -o tsv instead of trim
2 parents cb7576c + e29922a commit 1e8fd13

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

articles/operator-nexus/quickstarts-kubernetes-cluster-deployment-cli.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ Before you run the commands, you need to set several variables to define the con
4545
| SERVICE_CIDR | The network range for the Kubernetes services in the cluster, in CIDR notation. |
4646
| DNS_SERVICE_IP | The IP address for the Kubernetes DNS service. |
4747

48-
4948
Once you've defined these variables, you can run the Azure CLI command to create the cluster. Add the ```--debug``` flag at the end to provide more detailed output for troubleshooting purposes.
5049

5150
To define these variables, use the following set commands and replace the example values with your preferred values. You can also use the default values for some of the variables, as shown in the following example:
5251

5352
```bash
5453
RESOURCE_GROUP="myResourceGroup"
55-
LOCATION="$(az group show --name $RESOURCE_GROUP --query location | tr -d '\"')"
56-
SUBSCRIPTION_ID="$(az account show -o tsv --query id)"
54+
SUBSCRIPTION_ID="<Azure subscription ID>"
55+
LOCATION="$(az group show --name $RESOURCE_GROUP --query location --subscription $SUBSCRIPTION_ID -o tsv)"
5756
CUSTOM_LOCATION="/subscriptions/<subscription_id>/resourceGroups/<managed_resource_group>/providers/microsoft.extendedlocation/customlocations/<custom-location-name>"
5857
CSN_ARM_ID="/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.NetworkCloud/cloudServicesNetworks/<csn-name>"
5958
CNI_ARM_ID="/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.NetworkCloud/l3Networks/<l3Network-name>"
@@ -71,27 +70,28 @@ POD_CIDR="10.244.0.0/16"
7170
SERVICE_CIDR="10.96.0.0/16"
7271
DNS_SERVICE_IP="10.96.0.10"
7372
```
73+
7474
> [!IMPORTANT]
7575
> It is essential that you replace the placeholders for CUSTOM_LOCATION, CSN_ARM_ID, CNI_ARM_ID, and AAD_ADMIN_GROUP_OBJECT_ID with your actual values before running these commands.
7676
7777
After defining these variables, you can create the Kubernetes cluster by executing the following Azure CLI command:
7878

7979
```azurecli
8080
az networkcloud kubernetescluster create \
81-
--name "${CLUSTER_NAME}" \
82-
--resource-group "${RESOURCE_GROUP}" \
83-
--subscription "${SUBSCRIPTION_ID}" \
84-
--extended-location name="${CUSTOM_LOCATION}" type=CustomLocation \
85-
--location "${LOCATION}" \
86-
--kubernetes-version "${K8S_VERSION}" \
87-
--aad-configuration admin-group-object-ids="[${AAD_ADMIN_GROUP_OBJECT_ID}]" \
88-
--admin-username "${ADMIN_USERNAME}" \
89-
--ssh-key-values "${SSH_PUBLIC_KEY}" \
90-
--control-plane-node-configuration \
81+
--name "${CLUSTER_NAME}" \
82+
--resource-group "${RESOURCE_GROUP}" \
83+
--subscription "${SUBSCRIPTION_ID}" \
84+
--extended-location name="${CUSTOM_LOCATION}" type=CustomLocation \
85+
--location "${LOCATION}" \
86+
--kubernetes-version "${K8S_VERSION}" \
87+
--aad-configuration admin-group-object-ids="[${AAD_ADMIN_GROUP_OBJECT_ID}]" \
88+
--admin-username "${ADMIN_USERNAME}" \
89+
--ssh-key-values "${SSH_PUBLIC_KEY}" \
90+
--control-plane-node-configuration \
9191
count="${CONTROL_PLANE_COUNT}" \
9292
vm-sku-name="${CONTROL_PLANE_VM_SIZE}" \
93-
--initial-agent-pool-configurations "[{count:${INITIAL_AGENT_POOL_COUNT},mode:System,name:${INITIAL_AGENT_POOL_NAME},vm-sku-name:${INITIAL_AGENT_POOL_VM_SIZE}}]" \
94-
--network-configuration \
93+
--initial-agent-pool-configurations "[{count:${INITIAL_AGENT_POOL_COUNT},mode:System,name:${INITIAL_AGENT_POOL_NAME},vm-sku-name:${INITIAL_AGENT_POOL_VM_SIZE}}]" \
94+
--network-configuration \
9595
cloud-services-network-id="${CSN_ARM_ID}" \
9696
cni-network-id="${CNI_ARM_ID}" \
9797
pod-cidrs="[${POD_CIDR}]" \
@@ -110,6 +110,7 @@ After a few minutes, the command completes and returns information about the clu
110110
[!INCLUDE [quickstart-cluster-connect](./includes/kubernetes-cluster/quickstart-cluster-connect.md)]
111111

112112
## Add an agent pool
113+
113114
The cluster created in the previous step has a single node pool. Let's add a second agent pool using the ```az networkcloud kubernetescluster agentpool create``` command. The following example creates an agent pool named ```myNexusAKSCluster-nodepool-2```:
114115

115116
You can also use the default values for some of the variables, as shown in the following example:
@@ -123,13 +124,15 @@ AGENT_POOL_VM_SIZE="NC_M4_v1"
123124
AGENT_POOL_COUNT="1"
124125
AGENT_POOL_MODE="User"
125126
```
127+
126128
After defining these variables, you can add an agent pool by executing the following Azure CLI command:
127129

128130
```azurecli
129131
az networkcloud kubernetescluster agentpool create \
130132
--name "${AGENT_POOL_NAME}" \
131133
--kubernetes-cluster-name "${CLUSTER_NAME}" \
132134
--resource-group "${RESOURCE_GROUP}" \
135+
--subscription "${SUBSCRIPTION_ID}" \
133136
--extended-location name="${CUSTOM_LOCATION}" type=CustomLocation \
134137
--count "${AGENT_POOL_COUNT}" \
135138
--mode "${AGENT_POOL_MODE}" \

articles/operator-nexus/quickstarts-tenant-workload-deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ To define these variables, use the following set commands and replace the exampl
5252
```bash
5353
# Azure parameters
5454
RESOURCE_GROUP="myResourceGroup"
55-
SUBSCRIPTION="$(az account show -o tsv --query id)"
55+
SUBSCRIPTION="<Azure subscription ID>"
5656
CUSTOM_LOCATION="/subscriptions/<subscription_id>/resourceGroups/<managed_resource_group>/providers/microsoft.extendedlocation/customlocations/<custom-location-name>"
57-
LOCATION="$(az group show --name $RESOURCE_GROUP --query location | tr -d '\"')"
57+
LOCATION="$(az group show --name $RESOURCE_GROUP --query location --subscription $SUBSCRIPTION -o tsv)"
5858

5959
# VM parameters
6060
VM_NAME="myNexusVirtualMachine"

0 commit comments

Comments
 (0)