// This assembly is included in the following assemblies:
//
// assembly-customizing-deployments.adoc

[id='con-customizing-pods-{context}']
= Customizing Pods

In addition to Labels and Annotations, you can customize some other fields on Pods.
These fields are described in the following table and affect how the Pod is created.

[table,stripes=none]
|===
|Field |Description

|`terminationGracePeriodSeconds`
|Defines the period of time, in seconds, by which the Pod must have terminated gracefully.
After the grace period, the Pod and its containers are forcefully terminated (killed).
The default value is `30` seconds.

NOTE: You might need to increase the grace period for very large Kafka clusters, so that the Kafka brokers have enough time to transfer their work to another broker before they are terminated.

|`imagePullSecrets`
|Defines a list of references to Kubernetes Secrets that can be used for pulling container images from private repositories.
For more information about how to create a Secret with the credentials, see {K8sPullingImagesFromPrivateRegistries}.

NOTE: When the `STRIMZI_IMAGE_PULL_SECRETS` environment variable in Cluster Operator and the `imagePullSecrets` option are specified, only the `imagePullSecrets` variable is used. The `STRIMZI_IMAGE_PULL_SECRETS` variable is ignored.

|`securityContext`
|Configures pod-level security attributes for containers running as part of a given Pod.
For more information about configuring SecurityContext, see {K8sConfigureSecurityContext}.

|`priorityClassName`
|Configures the name of the Priority Class which will be used for given a Pod.
For more information about Priority Classes, see {K8sPriorityClass}.

|`schedulerName`
| The name of the scheduler used to dispatch this `Pod`.
If not specified, the default scheduler will be used.

|===

These fields are effective on each type of cluster (Kafka and ZooKeeper; Kafka Connect and Kafka Connect with S2I support; and Kafka MirrorMaker).

The following example shows these customized fields on a `template` property:

[source,yaml,subs=attributes+]
----
# ...
template:
  pod:
    metadata:
      labels:
        label1: value1
    imagePullSecrets:
      - name: my-docker-credentials
    securityContext:
      runAsUser: 1000001
      fsGroup: 0
    terminationGracePeriodSeconds: 120
# ...
----

.Additional resources

* For more information, see xref:type-PodTemplate-reference[].
