vania-janet/multiturn-rag-retrieval-data huggingface dataset:
* own a custom domain so you can configure the DNS for this domain to point to IBM Cloud Internet Services name servers.
* and [understand the basics of Kubernetes](https://kubernetes.io/docs/tutorials/kubernetes-basics/).







 Step 1: Deploy an application to one location 

This tutorial deploys a Kubernetes application to clusters in multiple locations. You will start with one location, Dallas, and then repeat these steps for London.



 Create a Kubernetes cluster 

A minimal cluster with one (1) zone, one (1) worker node and the smallest available size (Flavor) is sufficient for this tutorial.

When creating the Kubernetes cluster below:



1. Set Cluster name to my-us-cluster.
2. Locate in North America and Dallas



Open the [Kubernetes clusters](https://cloud.ibm.com/kubernetes/clusters) and click Create cluster. See the documentation referenced below for more details based on the cluster type. Summary:



* Click Standard tier cluster
* For Kubernetes on VPC infrastructure see reference documentation [Creating VPC clusters](https://cloud.ibm.com/docs/containers?topic=containers-cluster-create-vpc-gen2&interface=ui).



* Click Create VPC:



* Enter a name for the VPC.
* Chose the same resource group as the cluster.
* Click Create.



* Attach a Public Gateway to each of the subnets that you create:



* Navigate to the [Virtual private clouds](https://cloud.ibm.com/vpc-ext/network/vpcs).
* Click the previously created VPC used for the cluster.
* Scroll down to subnets section and click a subnet.
* In the Public Gateway section, click Detached to change the state to Attached.
* Click the browser back button to return to the VPC details page.
* Repeat the previous three steps to attach a public gateway to each subnet.
If you are logging in with a federated ID, use ibmcloud login --sso.

ibmcloud login [--sso]
2. If you have multiple IBM Cloud accounts, select the account where you want to create your cluster.
3. To create clusters in a resource group other than default, target that resource group. A cluster can be created in only one resource group, and after the cluster is created, you can't change its resource group. You must have at least the [Viewer role](https://cloud.ibm.com/docs/openshift?topic=openshift-userschecking-perms) for the resource group to target it.

ibmcloud target -g <resource_group_name>
4. Review the zones where you can create your cluster. In the output of the following command, zones have a Location Type of dc. To span your cluster across zones, you must create the cluster in a [multizone-capable zone](https://cloud.ibm.com/docs/openshift?topic=openshift-regions-and-zoneszones-mz). Multizone-capable zones have a metro value in the Multizone Metro column. If you want to create a multizone cluster, you can use the IBM Cloud console, or [add more zones](https://cloud.ibm.com/docs/openshift?topic=openshift-add_workersadd_zone) to your cluster after the cluster is created.

ibmcloud oc locations

When you select a zone that is located outside your country, keep in mind that you might require legal authorization before data can be physically stored in a foreign country.
5. Review the worker node flavors that are available in that zone. The flavor determines the amount of virtual CPU, memory, and disk space that is set up in each worker node and made available to your apps. Worker nodes in classic clusters can be created as virtual machines on shared or dedicated infrastructure, or as bare metal machines that are dedicated to you.
You can use the ibmcloud ks cluster create vpc-gen2 command to create a single zone cluster in your VPC with worker nodes that are connected to one VPC subnet only. If you want to create a multizone cluster, you can use the IBM Cloud console, or [add more zones](https://cloud.ibm.com/docs/containers?topic=containers-add_workersvpc_add_zone) to your cluster after the cluster is created. The cluster takes a few minutes to provision.

ibmcloud ks cluster create vpc-gen2 --name <cluster_name> --zone <vpc_zone> --vpc-id <vpc_ID> --subnet-id <vpc_subnet_ID> --flavor <worker_flavor> [--version <major.minor.patch>] [--sm-group GROUP] [--sm-instance INSTANCE] [--pod-subnet] [--service-subnet] [--disable-public-service-endpoint] [--kms-account-id <kms_account_ID>] --kms-instance <KMS_instance_ID> --crk <root_key_ID>] [--secondary-storage STORAGE]

--name <cluster_name>
: Specify a name for your cluster. The name must start with a letter, can contain letters, numbers, periods (.), and hyphen (-), and must be 35 characters or fewer. Use a name that is unique across regions. The cluster name and the region in which the cluster is deployed form the fully qualified domain name for the Ingress subdomain. To ensure that the Ingress subdomain is unique within a region, the cluster name might be truncated and appended with a random value within the Ingress domain name.

--zone <zone>
: Specify the IBM Cloud zone where you want to create your cluster. Make sure that you use a zone that matches the metro city location that you selected when you created your VPC and that you have an existing VPC subnet for that zone.
For more information, see [Planning your cluster network setup](https://cloud.ibm.com/docs/containers?topic=containers-plan_clusters).



ibmcloud is subnet-create mysubnet1 <vpc_ID> --zone us-south-1 --ipv4-address-count 256



3. Create a cluster in your VPC in the same zone as the subnet. By default, your cluster is created with a public and a private cloud service endpoint. You can use the public cloud service endpoint to access the Kubernetes master, such as to run kubectl commands, from your local machine. Your worker nodes can communicate with the master on the private cloud service endpoint. For more information about the command options, see the [cluster create vpc-gen2 CLI reference docs](https://cloud.ibm.com/docs/containers?topic=containers-kubernetes-service-clicli_cluster-create-vpc-gen2).

ibmcloud ks cluster create vpc-gen2 --name myvpc-cluster --zone us-south-1 --version 1.26 --flavor bx2.2x8 --workers 1 --vpc-id <vpc_ID> --subnet-id <vpc_subnet_ID>
4. Check the state of your cluster. The cluster might take a few minutes to provision.



1. Verify that the cluster State is normal.

ibmcloud ks cluster ls --provider vpc-gen2
2. Download the Kubernetes configuration files.

ibmcloud ks cluster config --cluster myvpc-cluster
3. Verify that the kubectl commands run properly with your cluster by checking the Kubernetes CLI server version.

kubectl version --short

Example output

Client Version: 1.26
Server Version: 1.26+IKS









 Step 2: Deploy a privately available app 

Create a Kubernetes deployment to deploy a single app instance as a pod to your worker node in your VPC cluster.



1.
You have the choice to create clusters with an earlier version with the standard plan, so be sure to select version 1.21 or newer.



1. In the IBM Cloud console, click Manage > Access (IAM), and select Trusted profiles.
2. Click Create profile.
3. Describe your profile by providing a name and a description, and click Continue.
4. You can create the trusted profile before adding details by selecting Decide later. Or, establish trust by completing the following steps:



1. Select Compute resources and select a compute service type from the list.
2. If you select the option for All service resources, you can define multiple conditions to filter resources for the selected compute service type by clicking Add a condition. These conditions are based on attributes, such as resource groups or location, and apply to all existing and future resources. Resources must meet all the conditions to be included in the trusted profile.



The Kubernetes namespace and service account names that you enter do not have to exist already. Any future namespaces or service accounts with these names can establish trust. To list existing namespaces, log in to your cluster and run kubectl get ns. To list existing service accounts, log in to your cluster and run kubectl get sa -n <namespace>. You can also enter default for both. For more information, see [Using Trusted Profiles in your Kubernetes and OpenShift Clusters](https://www.ibm.com/cloud/blog/using-trusted-profiles-in-your-kubernetes-and-openshift-clusters).



1. If you select Specific resources, you can establish trust with one or more existing compute resource instances directly without conditions. For example, a Kubernetes cluster.



5. Click Continue.
6. (Optional) [Assign access to the trusted profile](https://cloud.ibm.com/docs/account?topic=account-create-trusted-profiletp-access).
7. Or, click Create without assigning any access.
If you didn't assign your configuration to a cluster or service when you created it, you can create an assignment by completing the following steps.



1. Open the [Satellite console](https://cloud.ibm.com/satellite/locations) in your browser.
2. Select the location where you created your storage configuration.
3. Click the Locations tab, then click Storage.
4. Click the storage configuration that you want to assign to a cluster group.
5. On the Configuration details page, click Create storage assignment.
6. In the Create an assignment pane, enter a name for your assignment.
7. From the Version drop-down list, select the storage configuration version that you want to assign.
8. From the Cluster group drop-down list, select the cluster group that you want to assign to the storage configuration. Note that the clusters in your cluster group where you want to assign storage must all be in the same Satellite location.
9. Click Create to create the assignment.
10. Verify that your storage configuration is deployed to your cluster.



1. From the [Satellite console](https://cloud.ibm.com/satellite/locations), navigate to your Location and select Storage
2. Click the storage configuration that you created and review the Assignments tab.
3. Click the Assignment that you created and review the Rollout status for your configuration.









 Creating an assignment in the CLI 



1. List your storage configurations and make a note of the storage configuration that you want to assign to your clusters.

ibmcloud sat storage config ls
2. Get the ID of the cluster, cluster group, or service that you want to assign storage to.

To make sure that your cluster is registered with Satellite Config or to create groups, see [Setting up clusters to use with Satellite Config](https://cloud.ibm.com/docs/satellite?topic=satellite-setup-clusters-satconfig).

Example command to list cluster groups.

ibmcloud sat group ls

Example command to list clusters.
Create a cluster 

This section steps through the build tasks needed to create the Windows Server Failover Cluster (WSFC) and the availability group.

This guide assumes that you:



* Have at least two servers running Windows 2019 and SQL Server 2019 to cluster.
* Have a bastion host with external Internet access.
* Have deployed active directory.





 Install the Failover Clustering feature 



1. RDP to the first SQL server using a user from the SQL Admins group account and open a PowerShell session.
2. Add the SQL Admins group to the local Remote Management Users group so users in this group, can execute remote commands.
3. Allow inbound TCP port 5022 into the server as this port is used for availability group traffic. Install the Failover Clustering feature and then restart the server:

$domainnb = "<NB_Domain>"
$group = $domainnb + "SQLAdmins"
Add-LocalGroupMember -Group "Remote Management Users" -Member $group
New-NetFirewallRule -DisplayName 'SQL-AG-Inbound' -Profile Domain -Direction Inbound -Action Allow -Protocol TCP -LocalPort 5022
Install-WindowsFeature –Name Failover-Clustering –IncludeManagementTools
Restart-Computer -Force
4. Repeat for the second SQL server.







 Create a WSFC and enable SQL Always On 



1. RDP to the first SQL server using a user from the SQL Admins group account and open a PowerShell session.
2. Run a cluster validation test. Ignore any "one pair of network interfaces" warnings, as this is normal for this deployment.
3. If there are no errors them create a WSFC cluster with a name of wsfc01 which includes the two SQL servers <hostname1> and <hostname2>. The -ManagementPointNetworkType Distributed option uses the node IP address of the virtual server which means that secondary IP addressing on the interface is not required. This option creates a Distributed Network Name (DNN), which routes traffic to the appropriate clustered resource.
4.
(https://cloud.ibm.com/docs/openshift?topic=openshift-learning-path-adminadmin_plan)[Create a cluster Create a cluster according to your planned setup.](https://cloud.ibm.com/docs/openshift?topic=openshift-learning-path-adminadmin_cluster)[Add storage Plan and add highly available persistent storage for your app data.](https://cloud.ibm.com/docs/openshift?topic=openshift-learning-path-adminadmin_storage)

 Learn more 

[IBM Developer<br><br>Visit IBM Developer for technical articles, code patterns, tutorials, and more.<br><br>![112-Developer-tools.svg](https://cloud.ibm.com/media/docs/images/homepage/112-Developer-tools.svg)](https://developer.ibm.com/components/redhat-openshift-ibm-cloud/)[IBM Training<br><br>Build your skills with IBM Cloud training.<br><br>![83-Elements-of-the-cloud.svg](https://cloud.ibm.com/media/docs/images/homepage/83-Elements-of-the-cloud.svg)](https://www.ibm.com/training/search?query=Red%20Hat%20OpenShift)[Community<br><br>Join the IBM Cloud community and collaborate with others.<br><br>![35-Connectivity.svg](https://cloud.ibm.com/media/docs/images/homepage/35-Connectivity.svg)](https://community.ibm.com/community/user/publiccloud/home)
If you [create a cluster](https://cloud.ibm.com/docs/containers?topic=containers-clusters&interface=cli) in the CLI with the [ibmcloud ks cluster create classic](https://cloud.ibm.com/docs/containers?topic=containers-kubernetes-service-cli&interface=clics_cluster_create) or [ibmcloud ks cluster create vpc-gen2](https://cloud.ibm.com/docs/containers?topic=containers-kubernetes-service-cli&interface=clicli_cluster-create-vpc-gen2), you can specify a Secrets Manager instance or secret group with the following command options:



* --sm-instance: Use this option to register a Secrets Manager instance to the cluster by specifying the instance CRN. To find the CRN of a Secrets Manager instance, run ibmcloud resource service-instance <name_of_instance> or navigate to your resource list in the UI and click on the instance.
* --sm-group: Use this option to specify the ID of the secret group. To find the secret group ID, run ibmcloud secrets-manager secret-groups.



If you create a cluster in the UI, follow these steps to specify a Secrets Manager instance or secret group:



1. In the Integrations section of the cluster create page, select the option to enable Secrets Manager.
2. From the Secrets Manager instance drop down menu, select the instance you want to register to the cluster. If no instances are available, [create one](https://cloud.ibm.com/docs/containers?topic=containers-secrets-mgrsecrets-mgr_setup_create).
3. From the Secrets Manager group drop down menu, select the secret group you want to apply.
4. Create the cluster.
5. Check that the Secrets Manager instance is registered to the cluster.



1. When your cluster is fully provisioned, click on the cluster to view the cluster details. Under Integrations, find the Secrets Manager heading and click Manage.
2.
You can use the ibmcloud oc cluster create vpc-gen2 command to create a single zone cluster in your VPC with worker nodes that are connected to one VPC subnet only. If you want to create a multizone cluster, you can use the IBM Cloud console, or [add more zones](https://cloud.ibm.com/docs/openshift?topic=openshift-add_workersvpc_add_zone) to your cluster after the cluster is created. The cluster takes a few minutes to provision.

ibmcloud oc cluster create vpc-gen2 --name <cluster_name> --zone <vpc_zone> --vpc-id <vpc_ID> --subnet-id <vpc_subnet_ID> --flavor <worker_flavor> --version 4.11_openshift --cos-instance <COS_CRN> --workers <number_workers_per_zone> [--sm-group GROUP] [--sm-instance INSTANCE] [--pod-subnet] [--service-subnet] [--disable-public-service-endpoint] [--kms-account-id <kms_account_ID>] --kms-instance <KMS_instance_ID> --crk <root_key_ID>] [--secondary-storage STORAGE]

--name <cluster_name>
: Specify a name for your cluster. The name must start with a letter, can contain letters, numbers, periods (.), and hyphen (-), and must be 35 characters or fewer. Use a name that is unique across regions. The cluster name and the region in which the cluster is deployed form the fully qualified domain name for the Ingress subdomain. To ensure that the Ingress subdomain is unique within a region, the cluster name might be truncated and appended with a random value within the Ingress domain name.

--zone <zone>
: Specify the IBM Cloud zone where you want to create your cluster.
Procedure to add clusters to vCenter Server instances 



1. From the VMware Solutions console, click Resources > vCenter Server from the left navigation pane.
2. In the vCenter Server table, click the instance that you want to add clusters to.

Ensure that the instance status is Available. Otherwise, you cannot add clusters to the instance.
3. Click the Infrastructure tab and click Create on the upper right of the Clusters table.
4. On the Create cluster page, select the cluster type.
5. For workload clusters, enter the cluster name and complete the following configuration.



1. Complete the licensing settings.



* For Business Partner users, the vSphere license (Enterprise Plus edition) is included and purchased on your behalf.
* For users who are not Business Partners, select Include with purchase for the new vSphere license to be purchased on your behalf.
* Bring Your Own License (BYOL) is no longer supported except for migrations or upgrades of existing BYOL clusters. Select I will provide or Use existing license and enter your own license key only if you are performing an upgrade or migration of an existing BYOL cluster.
* The Use existing license option is available only if you are using a BYOL vSphere or vSAN license for your instance. When the option is enabled, you can select the existing license only if the instance has enough capacity for the additional hosts.



2. Complete the bare metal server configuration.



* If you want to host the cluster in a different IBM Cloud data center than the one that the instance is hosted in, toggle the Select a different location switch on and choose the IBM Cloud data center to host the cluster.
* For Skylake or Cascade Lake CPU generation type, select the CPU model, RAM size, and the Number of bare metal servers.
* For SAP-certified Cascade Lake, select one of the preset configurations.



3. Complete the storage configuration.



* If you select NFS storage and want to add and configure the same settings to all file shares, specify the Number of shares, Size (GB), and Performance.
* To save the updates to a saved configuration, click Save configuration, select Modify current configuration, and click Continue.
* To save the updates to a new saved configuration, click Save configuration, select Create new configuration, enter a new name for the configuration, and click Continue.



8. To place the order, ensure that the account to be charged is correct, review and accept the terms, and click Create.







 Procedure to add gateway clusters to vCenter Server multizone instances 

You can add gateway clusters to your vCenter Server multizone instance if you did not select to enable during your initial order. When you add gateway clusters, you must add each cluster one at a time.

You cannot add more than one cluster in the same data center pod.



1. From the VMware Solutions console, click Resources > vCenter Server from the left navigation pane.
2. In the vCenter Server table, click the multizone instance that you want to add the gateway cluster to.
3. Click the Infrastructure tab and click Create on the upper right of the Gateway clusters table.
4. On the Create cluster page, select the data center to host the cluster, then enter the cluster name.
5. Select the amount of RAM and the Number of bare metal servers.
6. On the Summary pane, verify the cluster configuration before you add the cluster.



1. Review the settings for the cluster.
2. Review the estimated price of the cluster. Click Pricing details to generate a PDF summary. To save or print your order summary, click the Print or the Download icon ![Download icon](https://cloud.ibm.com/docs-content/v1/content/5bdb37c0149145723c5437e8176651928565e722/icons/download.svg) on the upper right of the PDF window.
3. Click the link or links of the terms that apply to your order, and confirm that you agree with these terms before you add the cluster.
4. Click Create.
In the Create an assignment pane, enter a name for your assignment.
7. From the Version drop-down list, select the storage configuration version that you want to assign.
8. From the Cluster group drop-down list, select the cluster group that you want to assign to the storage configuration. Note that the clusters in your cluster group where you want to assign storage must all be in the same Satellite location.
9. Click Create to create the assignment.
10. Verify that your storage configuration is deployed to your cluster.



1. From the [Satellite console](https://cloud.ibm.com/satellite/locations), navigate to your Location and select Storage
2. Click the storage configuration that you created and review the Assignments tab.
3. Click the Assignment that you created and review the Rollout status for your configuration.









 Creating an assignment in the CLI 



1. List your storage configurations and make a note of the storage configuration that you want to assign to your clusters.

ibmcloud sat storage config ls
2. Get the ID of the cluster, cluster group, or service that you want to assign storage to.

To make sure that your cluster is registered with Satellite Config or to create groups, see [Setting up clusters to use with Satellite Config](https://cloud.ibm.com/docs/satellite?topic=satellite-setup-clusters-satconfig).

Example command to list cluster groups.

ibmcloud sat group ls

Example command to list clusters.

ibmcloud oc cluster ls --provider satellite

Example command to list Satellite services.

ibmcloud sat service ls --location <location>
3. Assign your storage configuration to the cluster, group, or service that you retrieved earlier. For more information, see the ibmcloud sat storage assignment create[command](https://cloud.ibm.com/docs/satellite?topic=satellite-satellite-cli-referencecli-storage-assign-create).

Example command to assign a configuration to a cluster group.