# Defining Kubernetes connection parameters with Spark Universal

## Procedure

1. Click the Run view beneath the design workspace, then click the Spark configuration view.
2. Select Built-in from the Property type drop-down list.

   If you have already set up the connection parameters in the Repository as explained in [Centralizing a Hadoop connection](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2025-02/Centralizing%20a%20Hadoop%20connection/talend/en-US/studio-user-guide/8.0/centralizing-hadoop-connection), you can easily reuse it. To do this, select Repository from the Property type drop-down list, then click […] button to open the Repository Content dialog box and select the Hadoop connection to be used.

   Information noteTip: Setting up the connection in the Repository allows you to avoid configuring that connection each time you need it in the Spark configuration view of your Jobs. The fields are automatically filled.
3. Select Universal from the Distribution drop-down list, the Spark version from the Version drop-down list, and Kubernetes from the Runtime mode/environment drop-down list.
4. Complete the Kubernetes configuration parameters:
   | Parameter | Usage |
   | --- | --- |
   | Kubernetes master | Enter the API Server Address respecting the following<br>format:<br>k8s://https://&lt;k8s-apiserver-host&gt;:&lt;k8s-apiserver-port&gt;.<br>You can retrieve it using the kubectl config view<br>--minify command in your command line<br>interface. |
   | Number of executor<br>instances | Enter the number of executors to be used for the Job<br>execution. |
   | Use registry secret | Enter the password to access the Docker image, if<br>needed. |
   | Docker image | Enter the name of the Docker image to be used for the<br>execution. |
   | Namespace | Enter the namespace of the Docker cluster. |
   | Service account | Enter the name of the service account to be used. The<br>service account must have sufficient rights on the<br>Kubernetes cluster. |
   | Cloud storage | Select the Cloud provider you want to use from the<br>drop-down list and enter the information and credentials in<br>the corresponding fields. |
   | Cloud storage &gt; S3 | Set the following parameters to connect to S3:<br><br><ul> <li> <span>Bucket</span> </li> <li> <span>Path to folder</span> </li> <li> <span>Credentials type</span> </li> <li> <span>Access key</span> </li> <li> <span>Secret key</span> </li> </ul> |
   | Cloud storage &gt; Blob | Set the following parameters to connect to Azure Blob<br>Storage:<br><br><ul> <li> <span>Path to folder</span> </li> <li> <span>Storage account</span> </li> <li> <span>Container name</span> </li> <li> <span>Secret key</span> </li> </ul> |
   | Cloud storage &gt; Adls gen 2 | Set the following parameters to connect to ADLS Gen 2:<br><br><ul> <li> <span>Path to folder</span> </li> <li> <span>Storage account</span> </li> <li> <span>Credentials type</span> </li> <li> <span>Container name</span> </li> <li> <span>Secret key</span> </li> </ul> |
5. Enter the basic Configuration information:
   | Parameter | Usage |
   | --- | --- |
   | Use local timezone | Select this check box to let Spark use the local time<br>zone provided by the system.<br><br>Information noteNote:<br><br><ul> <li>If you clear this check box, Spark use UTC time                                                  zone.</li> <li>Some components also have the <span>Use                                                  local timezone for date</span> check box. If                                                  you clear the check box from the component, it                                                  inherits time zone from the Spark                                                  configuration.</li> </ul> |
   | Use dataset API in migrated<br>components | Select this check box to let the components use Dataset<br>(DS) API instead of Resilient Distributed Dataset (RDD) API:<br><br><ul> <li>If you select the check box, the components inside                                                the Job run with DS which improves performance.</li> <li>If you clear the check box, the components inside                                                the Job run with RDD which means the Job remains                                                unchanged. This ensure the backwards                                                compatibility.</li> </ul><br><br>This check box is selected by default, but if you import a Job from 7.3 backwards, the<br>check box will be cleared as those Jobs run with RDD.<br><br>Information noteImportant: If your Job contains<br>tDeltaLakeInput and tDeltaLakeOutput components, you<br>must select this check box. |
   | Use timestamp for dataset components | Select this check box to use<br>java.sql.Timestamp for dates.<br><br>Information noteNote: If<br>you leave this check box clear,<br>java.sql.Timestamp or<br>java.sql.Date can be used depending<br>on the pattern. |
   | Parallelize output files writing | Select this checkbox to enable the Spark Batch Job to run multiple<br>threads in parallel when writing output files. This option improves the<br>performance of the execution time.<br><br>When you leave<br>this checkbox cleared, the output files are written sequentially<br>within one thread.<br><br>On subJobs level, each subJob is treated<br>sequentially. Only the output file inside the subJob is<br>parallelized.<br><br>This option is only available for Spark Batch<br>Jobs containing the following output components:<br><br><ul> <li>tAvroOutput</li> <li>tFileOutputDelimited (only when the <span>Use dataset                                            API in migrated components</span> checkbox is                                        selected)</li> <li>tFileOutputParquet</li> </ul><br><br>Information noteImportant: To avoid memory<br>problems during the execution of the Job, you need to take into<br>account the size of the files being written and the execution<br>environment capacity before using this<br>parameter. |
6. In the Advanced properties table, add any Spark properties you need to use to override their default counterparts used by Talend Studio.

## Results

The connection details to the Kubernetes cluster are complete, you are ready to schedule executions of your Job or to run it immediately from this cluster.