vania-janet/multiturn-rag-retrieval-data huggingface dataset:
[Scalable web application on Kubernetes](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-scalable-webapp-kubernetes)Scalable web application on Kubernetes

This tutorial walks you through how to run a web application locally in a container, and then deploy it to a Kubernetes cluster created with Kubernetes Service. As an optional step you can build a container image and push the image to a private registry. Additionally, you will learn how to bind a custom subdomain, monitor the health of the environment, and scale the application.

Kubernetes service Container Registry

+1

Secrets Manager



* 2 hours
* 2023-05-05



[Deploy isolated workloads across multiple locations and zones](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vpc-multi-region)Deploy isolated workloads across multiple locations and zones

This tutorial walks you through steps for setting up highly available and isolated workloads by provisioning IBM Cloud® Virtual Private Clouds (VPCs). You will create virtual server instances (VSIs) in multiple zones within one region to ensure the high availability of the application. You will create additional VSIs in a second region and configure a global load balancer (GLB) to provide high availability between regions and reduce network latency for users in different geographies.

Virtual Private Cloud (VPC) Cloud Internet Services (CIS)

+1

Secrets Manager



* 2 hours
* 2023-05-05



[Getting started with Security and Compliance Center](https://cloud.ibm.com/docs/security-compliance?topic=security-compliance-getting-started)Getting started with Security and Compliance Center

For highly regulated industries, such as financial services, achieving continuous compliance within a cloud environment is an important first step toward protecting customer and application data. Historically, that process was difficult and manual, which placed your organization at risk. But, with IBM Cloud® Security and Compliance Center, you can integrate daily, automatic compliance checks into your development lifecycle to help minimize that risk.

Security and Compliance Center Object Storage
Compliance to industry standards varies depending on the infrastructure provider of the cluster, such as classic or VPC.<br> * Monitor, isolate, and recover the cluster master.<br> * Provide highly available replicas of the Kubernetes master API server, etcd, scheduler, and controller manager components to protect against a master outage.<br> * Provide options for cluster network connectivity, such as public and private cloud service endpoints.<br> * Provide options for compute isolation, such as dedicated virtual machines or bare metal.<br> * Integrate Kubernetes role-based access control (RBAC) with IBM Cloud Identity and Access Management (IAM).<br><br><br> <br><br> * Set up and maintain security and regulation compliance for your apps and data. For example, choose how to set up your [cluster network](https://cloud.ibm.com/docs/containers?topic=containers-plan_clusters), [protect sensitive information](https://cloud.ibm.com/docs/containers?topic=containers-encryption) such as with IBM Key Protect encryption, and configure further [security settings](https://cloud.ibm.com/docs/containers?topic=containers-securitysecurity) to meet your workload's security and compliance needs. If applicable, configure your [firewall](https://cloud.ibm.com/docs/containers?topic=containers-firewallfirewall).<br><br><br>
Each database has its own copy of these instructions on how to provision and deploy a database or message queue and an application on IBM Cloud Kubernetes Service.





 Running on IBM Cloud 



1. If you do not already have an IBM Cloud account, [sign up here.](https://cloud.ibm.com/registration/)
2. [Download and install IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli). The IBM Cloud CLI tool enables you to communicate with IBM Cloud from your console or CLI.
3. Install the Kubernetes Service CLI plug-in and the Container Registry CLI plug-in

ibmcloud plugin install container-service
ibmcloud plugin install container-registry

To verify their installation, run

ibmcloud plugin list

You receive a response like this:

Listing installed plug-ins...

Plugin Name Version Status
container-registry 0.1.382
container-service/kubernetes-service 0.3.34
4. [Download and install the Kubernetes CLI.](https://kubernetes.io/docs/tasks/tools/install-kubectl/)

Follow the instructions for downloading and installing the Kubernetes CLI for the platform that you're using.
5. Connect to IBM Cloud in the CLI tool and follow the prompts to log in.

ibmcloud login

If you have a federated user ID, use the ibmcloud login --sso command to log in with your single sign-on ID.







 Creating your database 

This process creates a standard database instance in the service that you specify that might incur extra charges in your selected plan.



1. You must target a resource group, by using the following command:

ibmcloud target -g RESOURCE_GROUP



For more information, see [Working with resources and resource groups (ibmcloud resource).]
* [Getting Started with Cloud Identity and Access Management](https://cloud.ibm.com/docs/account?topic=account-access-getstarted)
* [Best practices for organizing resources in a resource group](https://cloud.ibm.com/docs/account?topic=account-account_setup)
* [Analyze logs and monitor health](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-application-log-analysisapplication-log-analysis)
* [Continuous Deployment to Kubernetes](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes)
* [Hello Helm toolchain](https://github.com/open-toolchain/simple-helm-toolchain)
* [Develop a microservices application with Kubernetes and Helm](https://github.com/open-toolchain/microservices-helm-toolchain)
* [Grant permissions to a user to view logs](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-work_iam)
* [Grant permissions to a user to view metrics](https://cloud.ibm.com/docs/monitoring?topic=monitoring-iam)
As you get acquainted with Kubernetes, [Helm](https://helm.sh/), the package manager for Kubernetes, will become a handy tool to version, assemble and deploy your application. [This sample DevOps toolchain](https://github.com/open-toolchain/simple-helm-toolchain) is a good starting point and is preconfigured for continuous delivery to a Kubernetes cluster. As your project grows into multiple microservices, the [Helm umbrella chart](https://helm.sh/docs/howto/charts_tips_and_tricks/complex-charts-with-many-dependencies) will provide a good solution to compose your application.





 Expand the tutorial 

Congratulations, your application can now safely be deployed from dev to production. Below are additional suggestions to improve application delivery.



* Follow the tutorial [Plan, create and update deployment environments](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-plan-create-update-deploymentsplan-create-update-deployments) to automate the deployment of your environments.
* Investigate [Using the IBM Cloud console to create VPC resources](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-a-vpc-using-the-ibm-cloud-console)







 Related information 



* [Getting Started with Cloud Identity and Access Management](https://cloud.ibm.com/docs/account?topic=account-access-getstarted)
* [Best practices for organizing resources in a resource group](https://cloud.ibm.com/docs/account?topic=account-account_setup)
* [Analyze logs and monitor health](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-application-log-analysisapplication-log-analysis)
Object storage buckets, App ID, and Secrets Manager services leverage a user-provided key to encrypt data.
7. Application management activities are logged by IBM Cloud Activity Tracker.







 Before you begin 

This tutorial requires:



* IBM Cloud CLI,



* IBM Cloud Kubernetes Service plugin (kubernetes-service),
* Container Registry plugin (container-registry),



* kubectl to interact with Kubernetes clusters,
* git to clone source code repository.



You will find instructions to download and install these tools for your operating environment in the [Getting started with solution tutorials](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorials) guide.

To avoid the installation of these tools you can use the [Cloud Shell](https://cloud.ibm.com/shell) from the IBM Cloud console.





 Step 1: Create services 

In the next section, you are going to create the services used by the application.



 Decide where to deploy the application 

The location and resource group of the resources should match the kubernetes cluster.





 Capture user and application activities 

The IBM Cloud Activity Tracker service records user-initiated activities that change the state of a service in IBM Cloud. At the end of this tutorial, you will review the events that were generated by completing the tutorial's steps.



1. Access the IBM Cloud catalog and create an instance of [IBM Cloud Activity Tracker](https://cloud.ibm.com/observe/activitytracker/create). Note that there can only be one instance of Activity Tracker per region. Set the Service name to secure-file-storage-activity-tracker.
2. Ensure you have the right permissions assigned to manage the service instance by following [these instructions](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-iam_manage_eventsadmin_account_opt1).







 Create a cluster for the application 

Kubernetes Service provides an environment to deploy highly available apps in containers that run in Kubernetes clusters.
This tutorial shows how the IBM Log Analysis service can be used to configure and access logs of a Kubernetes application that is deployed on IBM Cloud. You will deploy a Python application to a cluster provisioned on IBM Cloud Kubernetes Service, configure a logging agent, generate different levels of application logs and access worker logs, pod logs or network logs. Then, you will search, filter and visualize those logs through Log Analysis Web UI.

![solution tutorial icon](https://cloud.ibm.com/media/docs/images/homepage/solution-tutorial.svg) [Apply end to end security to a cloud application](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-cloud-e2e-security)Apply end to end security to a cloud application Solution tutorial

This tutorial walks you through key security services available in the IBM Cloud® catalog and how to use them together. An application that provides file sharing will put security concepts into practice.

![solution tutorial icon](https://cloud.ibm.com/media/docs/images/homepage/solution-tutorial.svg) [Architecture Framework](https://cloud.ibm.com/docs/architecture-framework)Architecture Framework Solution guide

The architecture framework can be used as a guide to provide a consistent approach to architect hybrid, multi-cloud end-to-end solutions based on your requirements.

![solution icon](https://cloud.ibm.com/media/docs/images/homepage/magic-wand.svg) [Best practices for organizing users, teams, applications](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-users-teams-applications)Best practices for organizing users, teams, applications Solution tutorial

This tutorial gives an overview of the concepts available in IBM Cloud for identity and access management and how they can be implemented to support the multiple development stages of an application.

!
Work with your cluster administrator to [set up continuous integration and delivery](https://cloud.ibm.com/docs/containers?topic=containers-cicd).

Package your app configuration files
: Package your app with tools like Kustomize or Helm.



* With the kustomize[project](https://cloud.ibm.com/docs/containers?topic=containers-appkustomize), you can write, customize, and reuse your Kubernetes resource YAML configurations.
* With the [Helm](https://helm.sh/docs/) Kubernetes package manager, you can specify all Kubernetes resources that your app requires in a Helm chart. Then, you can use Helm to create the YAML configuration files and deploy these files in your cluster. You can also [integrate IBM Cloud-provided Helm charts](https://cloud.ibm.com/kubernetes/helm) to extend your cluster's capabilities, such as with a block storage plug-in.



Are you looking to create YAML file templates? Some people use Helm to do just that, or you might try out other community tools such as [ytt](https://get-ytt.io/).







 Setting up service discovery 

Each of your pods in your Kubernetes cluster has an IP address. But when you deploy an app to your cluster, you don't want to rely on the pod IP address for service discovery and networking. Pods are removed and replaced frequently and dynamically. Instead, use a Kubernetes service, which represents a group of pods and provides a stable entry point through the service's virtual IP address, called its cluster IP. For more information, see the Kubernetes documentation on [Services](https://kubernetes.io/docs/concepts/services-networking/service/discovering-services).



 How can I make sure that my services are connected to the correct deployments and ready to go? 

For most services, add a selector to your service .yaml file so that it applies to pods that run your apps by that label.
Bound To crn:v1:bluemix:public:iam-identity::a/1bb222bb2b33333ddd3d3333ee4ee444::serviceid:ServiceId-ff55555f-5fff-6666-g6g6-777777h7h7hh
Created At 2019-02-01T19:06+0000
API Key i-8i88ii8jjjj9jjj99kkkkkkkkk_k9-llllll11mmm1
Locked false
UUID ApiKey-222nn2n2-o3o3-3o3o-4p44-oo444o44o4o4
4. Configure your cluster to add the service ID user to your cluster RBAC policies and to set your session context to your cluster server.



1. Log in to IBM Cloud with the service ID's API key credentials.

ibmcloud login --apikey <API_key>
2. Download and add the kubeconfig configuration file for your cluster to your existing kubeconfig in /.kube/config or the last file in the KUBECONFIG environment variable. Note: If you enabled the private cloud service endpoint and want to use it for the cluster context, include the --endpoint private option. To use the private cloud service endpoint to connect to your cluster, you must be in your IBM Cloud private network or connected to the private network through a [VPC VPN connection](https://cloud.ibm.com/docs/vpc?topic=vpc-vpn-onprem-example), or for classic infrastructure, a [classic VPN connection](https://cloud.ibm.com/docs/iaas-vpn?topic=iaas-vpn-getting-started) or [IBM Cloud Direct Link](https://cloud.ibm.com/docs/dl?topic=dl-get-started-with-ibm-cloud-dl).
Check out [Troubleshooting clusters and masters](https://cloud.ibm.com/docs/containers?topic=containers-debug_clusters) and [Troubleshooting worker nodes](https://cloud.ibm.com/docs/containers?topic=containers-debug_worker_nodes).





 Plan your deployment 

Before you deploy an app, decide how you want to set up your app so that your app can be accessed properly and be integrated with other services.



1. Kubernetes-native: [Plan your strategy for developing a Kubernetes-native app](https://cloud.ibm.com/docs/containers?topic=containers-plan_deploy).
2. Highly available: [Plan your strategy for a highly available deployment](https://cloud.ibm.com/docs/containers?topic=containers-plan_deployhighly_available_apps).



Looking for serverless? Try [Code Engine](https://cloud.ibm.com/docs/codeengine?topic=codeengine-getting-started).





 Develop your app 

Configure your app in a YAML file that declares the configuration of the Kubernetes object, and plan your app versioning strategy.



1. Develop your app:



1. Review the [basics of Kubernetes-native app deployments](https://cloud.ibm.com/docs/containers?topic=containers-plan_deploykube-objects).
2. Build app containers from [images in public or private image registries](https://cloud.ibm.com/docs/containers?topic=containers-images).
3. Specify your [app requirements in a YAML file](https://cloud.ibm.com/docs/containers?topic=containers-appapp_yaml), which declares the configuration of the Kubernetes object.



2. Version your app:



1.
In this tutorial, you will learn about IBM Cloud® Code Engine by deploying a text analysis with Natural Language Understanding application. You will create a Code Engine project, select the project and deploy Code Engine entities - applications and jobs - to the project. You will learn how to bind IBM Cloud services to your Code Engine entities. You will also understand the auto-scaling capability of Code Engine where instances are scaled up or down (to zero) based on incoming workload.

Code Engine Kubernetes service

+2

Object Storage,Natural Language Understanding



* 2 hours
* 2023-05-05



[Best practices for organizing users, teams, applications](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-users-teams-applications)Best practices for organizing users, teams, applications

This tutorial gives an overview of the concepts available in IBM Cloud for identity and access management and how they can be implemented to support the multiple development stages of an application.

Red Hat OpenShift on IBM Cloud Log Analysis

+3

Monitoring,Kubernetes service,Cloudant



* 1 hour
* 2023-06-14



[Moving a VM based app to Kubernetes](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-vm-to-containers-and-kubernetes)Moving a VM based app to Kubernetes

This tutorial walks you through the process of moving a VM based app to a Kubernetes cluster by using Kubernetes Service. Kubernetes Service delivers powerful tools by combining container and Kubernetes technologies, an intuitive user experience, and built-in security and isolation to automate the deployment, operation, scaling, and monitoring of containerized apps in a cluster of compute hosts.

Kubernetes service



* 2 hours
* 2023-06-22
To create and run these apps, you must be familiar with the concept of microservices, the [12-factor app](https://cloud.ibm.com/docs/containers?topic=containers-plan_deploy12factor) guidelines, [Docker and containerization principles](https://www.docker.com/), and available [Kubernetes deployment options](https://cloud.ibm.com/docs/containers?topic=containers-plan_deploy).

Kubernetes and IBM Cloud Kubernetes Service provide multiple options for how to [expose an app and keep an app private](https://cloud.ibm.com/docs/containers?topic=containers-cs_network_planning), [add persistent storage](https://cloud.ibm.com/docs/containers?topic=containers-storage-plan), [integrate other services](https://cloud.ibm.com/docs/containers?topic=containers-ibm-3rd-party-integrations), and how you can [secure your workloads and protect sensitive data](https://cloud.ibm.com/docs/containers?topic=containers-securitycontainer). Before you move your app to a cluster in IBM Cloud Kubernetes Service, verify that you can run your app as a containerized app on the supported RHEL 7 operating system and that Kubernetes and IBM Cloud Kubernetes Service provide the capabilities that your workload needs.

Do cluster administrators and developers interact with each other?
: Yes. Cluster administrators and developers must interact frequently so that cluster administrators understand workload requirements to provide this capability in the cluster, and so that developers know about available limitations, integrations, and security principles that they must consider in their app development process.







 Sizing your Kubernetes cluster to support your workload 

Figuring out how many worker nodes you need in your cluster to support your workload is not an exact science. You might need to test different configurations and adapt. Good thing that you are using IBM Cloud Kubernetes Service, where you can add and remove worker nodes in response to your workload demands.

To get started on sizing your cluster, ask yourself the following questions.
kubectl apply -f <secret_name>



api-key
: Enter the API key that you retrieved from your IBM Cloud Object Storage service credentials earlier. If you want to use HMAC authentication, specify the access-key and secret-key instead.

access-key
: Enter the access key ID that you retrieved from your IBM Cloud Object Storage service credentials earlier. If you want to use OAuth2 authentication, specify the api-key instead.

secret-key
: Enter the secret access key that you retrieved from your IBM Cloud Object Storage service credentials earlier. If you want to use OAuth2 authentication, specify the api-key instead.

service-instance-id
: Enter the GUID of your IBM Cloud Object Storage service instance that you retrieved earlier.

kp-root-key-crn
: Enter the base64 encoded Key Protect root key CRN to use Key Protect encryption.
5. Get the secrets in your cluster and verify the output.

kubectl get secret

Example output

NAME TYPE DATA AGE
cos-write-access ibm/ibmc-s3fs 2 7d19h
default-au-icr-io kubernetes.io/dockerconfigjson 1 55d
default-de-icr-io kubernetes.io/dockerconfigjson 1 55d
...
6. [Install the IBM Cloud Object Storage plug-in](https://cloud.ibm.com/docs/containers?topic=containers-storage_cos_install), or if you already installed the plug-in, [decide on the configuration](https://cloud.ibm.com/docs/containers?topic=containers-storage_cos_installconfigure_cos) for your IBM Cloud Object Storage bucket.
7. Optional: [Add your secret to the default storage classes](https://cloud.ibm.com/docs/containers?topic=containers-storage_cos_install).







 Limitations 



* IBM Cloud Object Storage is based on the s3fs-fuse file system.
The Kubernetes secret is automatically encrypted in etcd to protect your data.

Want to make your secrets even more secured? Ask your cluster admin to [enable a key management service provider](https://cloud.ibm.com/docs/containers?topic=containers-encryptionkeyprotect) in your cluster to encrypt new and existing secrets, such as the secret that stores the credentials of your IBM Cloud service instances.





 I already have an IBM Cloud service. Can I still use IBM Cloud service binding? 

Yes, you can use services that meet naming requirements and reuse the service credentials.



* Naming: Make sure that the service name is in the following regex format. Example permitted names are myservice or example.com. Characters that are not allowed include spaces and underscores.

[a-z0-9]([-a-z0-9][a-z0-9])?(.[a-z0-9]([-a-z0-9][a-z0-9])?)
* Service credentials: To use your existing service credentials, specify the --key option in the ibmcloud ks cluster service bind command and provide the name of your service credentials. IBM Cloud service binding automatically creates a Kubernetes secret with your existing service credentials.







 What if I want to use service credentials that use the private cloud service endpoint? 

By default, the ibmcloud ks cluster service bind command creates service credentials with the public cloud service endpoint. To use the private cloud service endpoint, you must manually create service credentials for your service that use the private cloud service endpoint, and then use the --key option to specify the name of the existing service credentials.

Your service might not yet support private cloud service endpoints. If you have a private-only cluster, you must use service credentials that use the private cloud service endpoint, or open up the public IP address and port to connect to your service.





 Can I use all IBM Cloud services in my cluster? 

You can use service binding only for services that support service keys so that the service credentials can automatically be created and stored in a Kubernetes secret.