Configuring Kubernetes Connector
Import HEAL SSL certificates into the keystore to configure the Kubernetes Connector.
Follow the below steps to configure the Kubernetes connector:
-
Import HEAL certificate to the Keystore for GRPC/HAPROXY and Control Center.
Procedure:
Generate the SSL certificate from the server using the following command.
echo -n | openssl s_client -connect '<SERVERIP>:<PORT>' | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/<servicename>.crtPlease replace the following:
<SERVERIP>:<PORT>: The IP and PORT of GRPC/HAPROXY and Control Center.
Import the certificate into the Java cacerts keystore using the following command.
keytool -import -trustcacerts -keystore <JAVA_HOME>/jre/lib/security/cacerts -storepass changeit -noprompt - alias <servicename> -file /tmp/<servicename>.crtMake a copy of your cacerts file to config directory.
cp <JAVA_HOME>/jre/lib/security/cacerts <Connector Build path>/config/This is needed to push KPIs to HEAL over SSL.
-
Update values of fields from insert statements in adapter_kubernetes_dao_data_insert.sql file for below tables.
heal_instance_creation_payload kubernetes_config prometheus_application Heal_access_token prometheus_kpi_response_path prometheus_query_filters prometheus_kpis prometheus_application_kpi_map heal_kpis domain_to_heal_kpi_mappings a1_logscan_endptFollowing tables are part of data adapter MySQL database.
- heal_instance_creation_payload table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| image | The name of the image to be monitored in Kubernetes. |
| namespace | Enter the NameSpace to monitor in Kubernetes. |
| host_ins_component_na me | Component name for the creation of host instance in Heal server. |
| host_ins_component_ve rsion | Component version for the creation of host instance in Heal server. |
| host_ins_service_identif ier | Service identifier for the creation of host instance in Heal server. |
| component_ins_compon ent_name | Component name for creation of component instance in Heal server. |
| component_ins_compon ent_version | Component version for the creation of component instance in Heal server. |
| component_ins_service _identifier | Service identifier for the creation of component instance in Heal server. |
Note: Based on the above configurations, Kubernetes creates the component and host pods in the Heal and then sends the data to the pods.
- kubernetes_config table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| file_name | File names for the Kubernetes connection. Config file, client.crt, client.key (Do not modify the file names) Refer to Prerequisites. |
| kube_config | The file content of the above files. And Config file content has to be encoded in Base64. Refer to Prerequisites. |
- prometheus_application table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| application_id | Enter the application_id. |
| host_port | Host and port number of Prometheus. |
| username | User name of Prometheus. |
| password | Password of Prometheus. |
- Heal_access_token table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| application_id | For application_id refer to table B. |
| host_port | Ip and port number of Heal . |
| client_id | Client Id of Heal. |
| user_name | User name of Heal. |
| password | Password of Heal. |
| grant_type | Grant type of Heal. |
- prometheus_kpi_response_path table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| host_or_comp | Enter the host and component. Refer to Prerequisites. |
| uid | Enter the uid of the host and compoenent. Refer to Prerequisites. |
| service_name | Enter the service_name parameter in the response. Refer to Prerequisites to take the service_name. |
| kpi_name | Enter the kpi_name parameter in the response. Refer to Prerequisites. |
| pod_name | Enter the pod_name parameter in the response. Refer to Prerequisites. |
| pod_namespace | Enter the pod_namespace parameter in the response. Refer to Prerequisites. |
- prometheus_query_filters table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| host_or_comp | Enter the host and component. Refer to table E. |
| query | Add the query key of the Prometheus. |
| query_value | Add the query value of the Prometheus. |
- prometheus_kpis table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| metric | Metric names of Prometheus. |
| host_or_comp | Enter the host and component. If the above metrices belongs to host, specify the host. If the the above metrices belongs to component, specify the comp. |
- prometheus_application_kpi_map table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| application_id | Application id from Prometheus_application table. Refer to table C. |
| kpi_id | Enter the Id from Prometheus_kpis table. Refer to table G. |
- heal_kpis table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| kpi_id | Heal KPI IDs. |
| kpi_name | Heal KPI names. |
| kpi_identifier | Heal KPI identifier. |
| is_group | By default the value is ‘0’. |
| group_name | By default the value is ’empty’. |
- domain_to_heal_kpi_mappings table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| domain | This indicates domain of Prometheus KPI. |
| heal_kpi_id | This contains value from kpi_id column from heal_kpis table. Refer to table I. |
| src_kpi_id | This contains value from id column from metrix table. Refer to id of table G. |
- a1_logscan_endpt table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| host | Enter elastic host address. |
| port | Enter the elastic port. |
| protocol | http or https By default http. |
-
Update values of fields from insert statements in adapter_kubernetes_insert.sql file for below tables.
adapter_chain_repository worker_parameters- adapter_chain_repository table:
| DB Column | Description |
|---|---|
| id | Unique identifier of a row in the table. |
| name | Name of the Kubernetes repository. Do not modify. |
| class_path | Class name of Kubernetes repository. Do not modify. |
| user_name | User name to connect to SQL server. |
| password | Password to connect to SQL server. |
| auto_reconnect | It can be true or false. Default value is true. Do not modify. If value of this attribute is true, Java module connects to SQL server. |
| cpool_min_size | This is the minimum number of retries. This indicates the minimum number of times Java module tries to connect to SQL server till the connection succeeds. |
| cpool_max_size | This is the maximum number of retries. This indicates the maximum number of times Java module tries to connect to SQL server till the connection succeeds. |
| connection_url | Java module connects to SQL server through JDBC connection. Specify the URL as follows: jdbc:mysql://<mysql server ip address>:<mysql server port>/<DT DB name> Example – jdbc:mysql://127.0.0.1:3306/dataadapter |
-
worker_parameters table, update the below queries:
update worker_parameters set value="{ token_url}" where id = 4; update worker_parameters set value="{ delete_url }" where id = 5; update worker_parameters set value="{ create_url }" where id= 6; update worker_parameters set value="{ log_forwarder_agent}" where id = 8; update worker_parameters set value="{ PrometheusBaseURL}" where id = 54; update worker_parameters set value="{ index-pattern}" where id=101; update worker_parameters set value="{elastic_query}" where id=113; update worker_parameters set value="{ user_name}" where id=114; update worker_parameters set value="{password}" where id=115; update worker_parameters set value="{date and time}" where id=118;