> ## Documentation Index
> Fetch the complete documentation index at: https://docs-xcor.paloaltonetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workloads

> Learn about different workload types in Palo Alto Networks Telemetry Pipeline.

> [!NOTE]
>
> This information is for Palo Alto Networks Telemetry Pipeline, which is a standalone
> product separate from Palo Alto Networks Cortex XCOR.

In Palo Alto Networks Telemetry Pipeline, you can use the PipelineKind attribute
to specify [workload](https://kubernetes.io/docs/concepts/workloads/controllers/)
types for pipelines.

Pipelines can run as the following workload types:

* **[Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)**:
  A pipeline run as a Deployment has a configurable number of
  [replica Pods](https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/scaling.md). If you don't specify a workload type,
  new pipelines run as Deployments by default.
* **[StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/)**:
  A pipeline run as a StatefulSet has a configurable number of replica Pods, similar to
  a Deployment pipeline, but each Pod has persistent data storage and a stable identity.
* **[DaemonSet](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/)**:
  A pipeline run as a DaemonSet adds a Pod to every node in the Kubernetes
  cluster where it's deployed.

## Set a pipeline's workload type

To set the workload type for a new pipeline, use the `--kind` flag in
[Pipeline CLI](https://docs-xcor.paloaltonetworks.com/ingest/pipeline/pipeline-cli):

```shell /INSTANCE/ /PIPELINE/ /WORKLOAD/ theme={null}
calyptia create pipeline \
--core-instance INSTANCE \
--name PIPELINE \
--kind WORKLOAD
```

Replace the following:

* *`INSTANCE`*: The name of your Core Instance.
* *`PIPELINE`*: The name to give your new pipeline.
* *`WORKLOAD`*: The workload type for your pipeline. Possible values: `deployment`,
  `statefulSet`, or `daemonSet`.

> [!NOTE]
>
> After you create a pipeline, you can't change its workload type.

### Additional settings for StatefulSet pipelines

There are several additional settings unique to StatefulSet pipelines, including
one required setting:

```shell /CLASS/ /POLICY1/ /POLICY2/ theme={null}
--storage-class CLASS \
--pvc-retention-policy-when-scaled POLICY1 \
--pvc-retention-policy-when-deleted POLICY2
```

* *`CLASS`*: Required. The [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/)
  to use for each Pod's [PersistentVolume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/).
  After you set this value for a StatefulSet pipeline, you can't modify it.
* *`POLICY1`*: Specifies whether Kubernetes should retain or delete the
  [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
  (PVC) associated with each affected Pod if the StatefulSet pipeline is scaled down.
  Possible values: `Retain` (default) and `Delete`. To use this flag, you must
  be running Kubernetes v1.32 or newer and must enable the `StatefulSetAutoDeletePVC`
  feature gate in Kubernetes.
* *`POLICY2`*: Specifies whether Kubernetes should retain or delete each Pod's PVC
  if the StatefulSet pipeline is deleted. Possible values: `Retain` (default)
  and `Delete`. To use this flag, you must be running Kubernetes v1.32 or newer
  and must enable the `StatefulSetAutoDeletePVC` feature gate in Kubernetes.

> [!NOTE]
>
> If you're using Kubernetes v1.31 or earlier, you can't set the `--pvc` flags to
> specify how Kubernetes handles PVC cleanup because older versions of Kubernetes
> don't handle PVC cleanup. Instead, Palo Alto Networks Telemetry Pipeline
> handles the cleanup process by
> deleting PVCs for deleted pipelines and retaining PVCs for scaled-down pipelines.
>
> If you're using Kubernetes v1.32 or later but don't enable the `StatefulSetAutoDeletePVC`
> feature gate, or if you attempt to set the `--pvc` flags in Kubernetes v1.31 or earlier,
> neither Kubernetes nor Palo Alto Networks Telemetry Pipeline handles PVC cleanup. In this scenario,
> all PVCs persist until you delete them manually.

For example, the following command creates a StatefulSet pipeline named `my-pipeline`
associated with a Core Instance named `my-instance`. It uses a StorageClass named
`standard`, and Palo Alto Networks Telemetry Pipeline will retain PVCs for
any scaled-down pods but delete
all PVCs if the pipeline is deleted.

```shell theme={null}
calyptia create pipeline \
--core-instance my-instance \
--name my-pipeline \
--kind statefulSet \
--storage-class standard \
--pvc-retention-policy-when-scaled Retain \
--pvc-retention-policy-when-deleted Delete
```


## Related topics

- [GCP PubSub Input source plugin](https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/source-plugins/gcp-pubsub.md)
- [HashiCorp Vault](https://docs-xcor.paloaltonetworks.com/ingest/xcor/integrations/collector/vault.md)
- [Google Cloud BigQuery destination plugin](https://docs-xcor.paloaltonetworks.com/ingest/pipeline/plugins/destination-plugins/google-bigquery.md)
- [Backpressure](https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/configure/backpressure.md)
- [Palo Alto Networks Telemetry Pipeline concepts](https://docs-xcor.paloaltonetworks.com/ingest/pipeline/v2/concepts.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.