vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Prometheus Prometheus is an open source monitoring, logging, and alerting tool that was designed for Kubernetes. Prometheus retrieves detailed information about the cluster, worker nodes, and deployment health based on Kubernetes logging information. CPU, memory, I/O, and network activity is collected for each container that runs in a cluster. You can use the collected data in custom queries or alerts to monitor performance and workloads in your cluster. To use Prometheus, follow the [CoreOS instructions](https://github.com/prometheus-operator/kube-prometheus). Yes Yes 
 Sematext View metrics and logs for your containerized applications by using [Sematext](https://sematext.com/). For more information, see [Monitoring and logging for containers with Sematext](https://www.ibm.com/cloud/blog/monitoring-logging-ibm-bluemix-container-service-sematext). Yes Yes 
 Splunk Import and search your Kubernetes logging, object, and metrics data in Splunk by using Splunk Connect for Kubernetes. Splunk Connect for Kubernetes is a collection of Helm charts that deploy a Splunk-supported deployment of Fluentd to your Kubernetes cluster, a Splunk-built Fluentd HTTP Event Collector (HEC) plug-in to send logs and metadata, and a metrics deployment that captures your cluster metrics. For more information, see [Solving Business Problems with Splunk on IBM Cloud Kubernetes Service](https://www.ibm.com/cloud/blog/solving-business-problems-with-splunk-on-ibm-cloud-kubernetes-service). Yes Yes 
 Weave Scope [Weave Scope](https://www.weave.works/oss/scope/) provides a visual diagram of your resources within a Kubernetes cluster, including services, pods, containers, processes, nodes, and more. Weave Scope provides interactive metrics for CPU and memory and also provides tools to tail and exec into a container. Yes Yes 







 Security services
[Continuous Deployment to Kubernetes](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes)



* [Objectives](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-objectives)
* [Before you begin](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-prereq)
* [Create development Kubernetes cluster](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-create_kube_cluster)
* [Create a sample application](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-create_application)
* [Modify the application and deploy the updates](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-6)
* [Deploy to a production environment](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-deploytoproduction)
* [Setup Slack notifications](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-setup_slack)
* [Remove resources](https://cloud.ibm.com/docs/Registry?topic=Registry-continuous-deployment-to-kubernetescontinuous-deployment-to-kubernetes-removeresources)
After that, you bind the database to the Kubernetes cluster through the private endpoint with the cluster service bind command.

ibmcloud ks cluster service bind <your_cluster_name> <resource_group> <your_database_deployment> --key <your-private-key>

Verify - Verify that the Kubernetes secret was created in your cluster namespace. Running the following command, you get the API key for accessing the instance of your deployment that's provisioned in your account.

kubectl get secrets --namespace=default

More information on binding services is found in the [Kubernetes Service documentation](https://cloud.ibm.com/docs/containers?topic=containers-service-bindingbind-services).





 Configuring in your Kubernetes app 

When you bind your application to Kubernetes Service, it creates an environment variable from the cluster's secrets. Your deployment's connection information lives in BINDING as a JSON object. Load and parse the JSON object into your application to retrieve the information your application's driver needs to make a connection to the database.

The [Connection Strings](https://cloud.ibm.com/docs/messages-for-rabbitmq?topic=messages-for-rabbitmq-connection-stringsconnection-string-breakdown) page contains a reference of the JSON fields.

For more information, see the [Kubernetes Service docs](https://cloud.ibm.com/docs/containers?topic=containers-service-bindingreference_secret).
PriorityClassName: <none>
Node: 10.xxx.xx.xxx/10.xxx.xx.xxx
Start Time: Mon, 22 Apr 20122 12:40:48 -0400
Labels: pod-template-hash=d99cddb45
run=hello-world-deployment
Annotations: kubernetes.io/psp=ibm-privileged-psp
Status: Running
IP: 172.30.xxx.xxx
...



8. Log in to the pod so that you can make a request to your app from within the cluster.

kubectl exec -it hello-world-deployment-d99cddb45-lmj2v /bin/sh
9. Make a request to the NodePort service by using the worker node private IP address and the node port that you previously retrieved.

wget -O - 10.xxx.xx.xxx:30872

Example output

Connecting to 10.xxx.xx.xxx:30872 (10.xxx.xx.xxx:30872)
Hello world from hello-world-deployment-d99cddb45-lmj2v! Your app is up and running in a cluster!
- 100% || 88 0:00:00 ETA

To close your pod session, enter exit.







 Step 3: Set up a Load Balancer for VPC to expose your app publicly 

Set up a VPC load balancer to expose your app on the public network.

When you create a Kubernetes LoadBalancer service in your cluster, a load balancer for VPC is automatically created in your VPC outside of your cluster. The load balancer is multizonal and routes requests for your app through the private NodePorts that are automatically opened on your worker nodes. The following diagram illustrates how a user accesses an app's service through the load balancer, even though your worker node is connected to only a private subnet.

Zoom

![VPC load balancing for a cluster.]
container-service[kubernetes-service] 1.0.312 false
cra 0.0.9 false
doi 0.3.3 false
schematics 1.6.0 false

 ibmcloud dev --version
ibmcloud dev version 2.9.0

 java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.24.0, JRE 11 Linux amd64-64-Bit Compressed References 20210120_910 (JIT enabled, AOT enabled)
OpenJ9 - 345e1b09e
OMR - 741e94ea8
JCL - 0a86953833 based on jdk-11.0.10+9)

 ant -version
Apache Ant(TM) version 1.10.11 compiled on July 10 2021

 mvn -version
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /opt/IBM/maven
Java version: 11.0.10, vendor: AdoptOpenJDK, runtime: /usr/local/openjdk-11
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.47-linuxkit", arch: "amd64", family: "unix"

 gradle -version

Welcome to Gradle 7.2!

Here are the highlights of this release:
- Toolchain support for Scala
- More cache hits when Java source files have platform-specific line endings
- More resilient remote HTTP build cache behavior

For more details see https://docs.gradle.org/7.2/release-notes.html
After that, you bind the database to the Kubernetes cluster through the private endpoint with the cluster service bind command.

ibmcloud ks cluster service bind <your_cluster_name> <resource_group> <your_database_deployment> --key <your-private-key>

Verify - Verify that the Kubernetes secret was created in your cluster namespace. Running the following command, you get the API key for accessing the instance of your deployment provisioned in your account.

kubectl get secrets --namespace=default

More information on binding services is found in the [Kubernetes Service documentation](https://cloud.ibm.com/docs/containers?topic=containers-service-bindingbind-services).





 Configuring in your Kubernetes app 

When you bind your application to Kubernetes Service, it creates an environment variable from the cluster's secrets. Your deployment's connection information lives in BINDING as a JSON object. Load and parse the JSON object into your application to retrieve the information your application's driver needs to make a connection to the database.

The [Connection Strings](https://cloud.ibm.com/docs/databases-for-enterprisedb?topic=databases-for-enterprisedb-connection-stringsconnection-string-breakdown) page contains a reference of the JSON fields.

For more information, see the [Kubernetes Service docs](https://cloud.ibm.com/docs/containers?topic=containers-service-bindingreference_secret).
"bootstrap.servers": "kafka-0.mh-svc1.eu-de.containers.appdomain.cloud:9093, kafka-2.mh-svc2-0000.eu-de.containers.appdomain.cloud:9093,kafka-1.mh-svc3.eu-de.containers.appdomain.cloud:9093",
"topic.name": "my-monitoring-topic",
"compression.type": "lz4",
"security.protocol": "SASL_SSL",
"sasl.mechanism": "PLAIN",
"sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username="token" password="xxxxxxxxxxxxx";","ssl.truststore.base64.content":""}},"dataStreamRules":[{"uuid":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","enabled":true,"metrics":"kube_daemonset_labels","kube_node_status_condition"],"aggregation":"avg","aggregationSec":10,"scope":"kubernetes.cluster.name = "mycluster"",
"dataStreamConfigUuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
]
}
Show more





 Create a streaming configuration 

Use this method to configure 1 streaming configuration that forwards a set of metrics to Event Streams.

curl --request POST https://<ENDPOINT>/api/v1/dataStream/configs
-H "content-type: application/json"
-H "Authorization: <TOKEN>"
-d @streaming-config.json

Where



* <ENDPOINT> represents the endpoint that is targetted by the REST API call.
After that, you bind the database to the Kubernetes cluster through the private endpoint with the cluster service bind command.

ibmcloud ks cluster service bind <your_cluster_name> <resource_group> <your_database_deployment> --key <your-private-key>

Verify - Verify that the Kubernetes secret was created in your cluster namespace. Running the following command, you get the API key for accessing the instance of your deployment that is provisioned in your account.

kubectl get secrets --namespace=default

More information on binding services is found in the [Kubernetes Service documentation](https://cloud.ibm.com/docs/containers?topic=containers-service-bindingbind-services).





 Configuring in your Kubernetes app 

When you bind your application to Kubernetes Service, it creates an environment variable from the cluster's secrets. Your deployment's connection information lives in BINDING as a JSON object. Load and parse the JSON object into your application to retrieve the information your application's driver needs to make a connection to the database.

The [Connection Strings](https://cloud.ibm.com/docs/databases-for-redis?topic=databases-for-redis-connection-stringsconnection-string-breakdown) page contains a reference of the JSON fields.

For more information, see the [Kubernetes Service docs](https://cloud.ibm.com/docs/containers?topic=containers-service-bindingreference_secret).
* What is IBM Cloud Code Engine?

Code Engine is developed by IBM and it is built with many open source components. The goal is to extend the capabilities of Kubernetes to help you create modern, source-centric containerized, and serverless apps that run on your Kubernetes cluster. The platform is designed to address the needs of developers who today must decide what type of app they want to run in the cloud: 12-factor apps, containers, or functions. For more information, see [About Code Engine](https://cloud.ibm.com/docs/codeengine?topic=codeengine-about).

With Code Engine, you can deploy applications, run jobs, and even build source code from a single dashboard.
* What is a project?

A project is a grouping of Code Engine entities such as applications, jobs, and builds. A project is based on a Kubernetes namespace. The name of your project must be unique within your IBM Cloud® resource group, user account, and region. Projects are used to manage resources and provide access to its entities.

A project provides the following items.



* Provides a unique namespace for entity names.
* Manages access to project resources (inbound access).
* Manages access to backing services, registries, and repositories (outbound access).
* Has an automatically generated certificate for Transport Layer Service (TLS).



For more information about projects, see [Manage projects](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).
* Where can I find code samples?

You can find code samples to help you explore the capabilities of Code Engine. Visit our [Code Engine code samples repository on GitHub](https://github.com/IBM/CodeEngine).
* I need more memory! Can I increase my limits?
kube-system private-crdf253b6025d64944ab99ed63bb4567b6-alb1-d5dd478db-7p9q6 0 (0%) 0 (0%) 0 (0%) 0 (0%)
kube-system public-crdf253b6025d64944ab99ed63bb4567b6-alb1-5ff8cdff89-s77z6 0 (0%) 0 (0%) 0 (0%) 0 (0%)
kube-system public-crdf253b6025d64944ab99ed63bb4567b6-alb1-5ff8cdff89-kvs9f 0 (0%) 0 (0%) 0 (0%) 0 (0%)
2. Confirm that no ALB pods are deployed to non-edge nodes.

kubectl describe nodes -l dedicated!=edge | grep alb

If the ALB pods are correctly deployed to edge nodes, no ALB pods are returned. Your ALBs are successfully rescheduled onto only edge worker nodes.





You labeled worker nodes in a worker pool with dedicated=edge and redeployed all the existing ALBs and NLBs to the edge nodes. All subsequent ALBs and NLBs that are added to the cluster are also deployed to an edge node in your edge worker pool. Next, prevent other [workloads from running on edge worker nodes](https://cloud.ibm.com/docs/containers?topic=containers-edgeedge_workloads) and [block inbound traffic to NodePorts on worker nodes](https://cloud.ibm.com/docs/containers?topic=containers-network_policiesblock_ingress).





 Preventing app workloads from running on edge worker nodes 

A benefit of edge worker nodes is that they can be specified to run networking services only.

Using the dedicated=edge toleration means that all network load balancer (NLB) and Ingress application load balancer (ALB) services are deployed to the labeled worker nodes only.
* Adds the [ibmcloud ks cluster subnet detach](https://cloud.ibm.com/docs/containers?topic=containers-kubernetes-service-clics_cluster_subnet_detach) command to detach a public or private portable subnet in a classic IBM Cloud infrastructure account from a cluster.
* Renames the ibmcloud ks machine-types command to ibmcloud ks flavors. You can still use the machine-types alias.
* In the output of ibmcloud ks flavors (machine-types), indicates flavors that are supported only for IBM Cloud Kubernetes Service or only for Red Hat OpenShift on IBM Cloud.
* In the output of ibmcloud ks cluster get, changes the term Owner to Creator to reflect that the field returns information about the user that created the cluster.
* Improves error handling for ibmcloud ks zone add.
* Updates the help text in various languages.







 Version 0.3.58 

Version 0.3.58 of the CLI was released on 2 July 2019.



* Fixes a bug so that a worker pool rebalance message is not returned when the cluster autoscaler is enabled.
* Updates help text for the cluster master private-service-endpoint enable and nlb-dns monitor configure commands.
* Updates the help text in various languages.







 Version 0.3.49 

Version 0.3.49 of the CLI was released on 18 June 2019.



* Updates the Go version to 1.12.6.







 Version 0.3.47 

Version 0.3.47 of the CLI was released on 15 June 2019.



* Fixes a bug so that empty tables are not returned in the output of ibmcloud ks kube-versions.
* Updates the NLB DNS model so that an array of NLB IP addresses is returned by ibmcloud ks nlb-dns ls.
* Changes the description text for the IBM Cloud Kubernetes Service CLI plug-in.







 Version 0.3.34 

Version 0.3.34 of the CLI was released on 31 May 2019.



* Adds the versions command to list all supported Kubernetes and Red Hat OpenShift versions.
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]



Table 3. Understanding the YAML parameters

 Parameter Description 

 kind Use Role to grant access to resources within a specific namespace. Use ClusterRole to grant access to cluster-wide resources such as worker nodes, or to namespace-scoped resources such as pods in all namespaces. 
 apiVersion <br><br> * For clusters that run Kubernetes 1.8 or later, use rbac.authorization.k8s.io/v1.<br> * For earlier versions, use apiVersion: rbac.authorization.k8s.io/v1beta1.<br><br><br> 
 metadata.namespace For kind Role only: Specify the Kubernetes namespace to which access is granted. 
 metadata.name Name the role or cluster role. 
 rules.apiGroups Specify the Kubernetes [API groups](https://kubernetes.io/docs/reference/using-api/api-groups) that you want users to be able to interact with, such as "apps", "batch", or "extensions". For access to the core API group at REST path api/v1, leave the group blank: [""]. 
 rules.resources Specify the Kubernetes [resource types](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) to which you want to grant access, such as "daemonsets", "deployments", "events", or "ingresses". If you specify "nodes", then the kind must be ClusterRole. 
 rules.verbs Specify the types of [actions](https://kubectl.docs.kubernetes.io/) that you want users to be able to do, such as "get", "list", "describe", "create", or "delete". 



2. Create the role or cluster role in your cluster.

oc apply -f my_role.yaml
3.
apiVersion <br><br> * For clusters that run Kubernetes 1.8 or later, use rbac.authorization.k8s.io/v1.<br> * For earlier versions, use apiVersion: rbac.authorization.k8s.io/v1beta1.<br><br><br> 
 metadata.namespace For kind Role only: Specify the Kubernetes namespace to which access is granted. 
 metadata.name Name the role or cluster role. 
 rules.apiGroups Specify the Kubernetes [API groups](https://kubernetes.io/docs/reference/using-api/api-groups) that you want users to be able to interact with, such as "apps", "batch", or "extensions". For access to the core API group at REST path api/v1, leave the group blank: [""]. 
 rules.resources Specify the Kubernetes [resource types](https://kubernetes.io/docs/reference/kubectl/cheatsheet/) to which you want to grant access, such as "daemonsets", "deployments", "events", or "ingresses". If you specify "nodes", then the kind must be ClusterRole. 
 rules.verbs Specify the types of [actions](https://kubectl.docs.kubernetes.io/) that you want users to be able to do, such as "get", "list", "describe", "create", or "delete". 



2. Create the role or cluster role in your cluster.

kubectl apply -f my_role.yaml
3. Verify that the role or cluster role is created.



* Role:

kubectl get roles -n <namespace>
* Cluster role:

kubectl get clusterroles





2. Bind users to the role or cluster role.



1. Create a .yaml file to bind users to your role or cluster role. Note the unique URL to use for each subject's name.

kind: RoleBinding
The version that you upload is not applied to your cluster until you add a subscription to your configuration. 
 Subscription A Satellite subscription specifies which Kubernetes resource is deployed to one or more cluster groups. After you create the subscription, Satellite Config automatically downloads the Kubernetes resource that you specified and starts applying it across all clusters that belong to the cluster group. This process takes a few minutes to complete. <br>The clusters in your cluster group can exist in your Satellite or in IBM Cloud. To include clusters that you run in IBM Cloud, you must register the cluster with the Satellite Config component and install the Satellite Config agent on this cluster. 
 Version A version represents a Kubernetes resource YAML file that you uploaded or manually created for a Satellite configuration. You can include any Kubernetes resource in your version and upload as many versions to a configuration as you like. (This concept applies to Direct Upload configurations only.) 
 Cluster groups A cluster group specifies a set of clusters that are registered with the Satellite Config component and that are included in a Satellite configuration. Clusters that run in your location are automatically registered and can be added to a cluster group. Clusters that run in IBM Cloud must be manually registered with the Satellite Config component before you can add them to a cluster group.
Scalable web application on Kubernetes 

This tutorial may incur costs. Use the [Cost Estimator](https://cloud.ibm.com/estimator/review) to generate a cost estimate based on your projected usage.

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](https://cloud.ibm.com/kubernetes/catalog/cluster). 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.

Containers are a standard way to package apps and all their dependencies so that you can seamlessly move the apps between environments. Unlike virtual machines, containers do not bundle the operating system. Only the app code, run time, system tools, libraries, and settings are packaged inside containers. Containers are more lightweight, portable, and efficient than virtual machines.



 Objectives 



* Deploy a web application to the Kubernetes cluster.
* Bind a custom subdomain.
* Monitor the logs and health of the cluster.
* Scale Kubernetes pods.



Zoom

![Architecture](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution2/Architecture.svg)

Architecture diagram



1. A developer downloads or clones a sample web application.
2. Optionally build the application to produce a container image.
3. Optionally the image is pushed to a namespace in the IBM Cloud Container Registry.
4. The application is deployed to a Kubernetes cluster.
5. Users access the application.







 Before you begin 

This tutorial requires:



* IBM Cloud CLI,



* IBM Cloud Kubernetes Service plugin (kubernetes-service),