# General Installation Prerequisites

## Prerequisites

* [x] **Confirm Compatibility**

Before installing Trilio for Kubernetes, please review the [compatibility matrix](https://docs.trilio.io/kubernetes/4.0.x/about-trilio-for-kubernetes/compatibility-matrix) to ensure Trilio can function smoothly in your Kubernetes environment.

* [x] **Verify that you are using a CSI Driver which provides Snapshot functionality**

Trilio for Kubernetes requires a compatible Container Storage Interface (CSI) driver that provides the **Snapshot** feature.

You should check the [Kubernetes CSI Developer Documentation](https://kubernetes-csi.github.io/docs/drivers.html) to select a driver appropriate for your backend storage solution. See the selected CSI driver's documentation for details on the installation of the driver in your cluster.

* [x] **Verify that the Required Custom Resource Definitions (CRD) are installed**

Trilio for Kubernetes requires the following Custom Resource Definitions (CRD) to be installed on your cluster:`VolumeSnapshot`, `VolumeSnapshotContent`, and `VolumeSnapshotClass.`

<details>

<summary>About Installing the Required CRDs</summary>

Before attempting to install the VolumeSnapshot CRDs, it is important to confirm that the CRDs are not already present so you do not install them twice.

To do this, run the following command:

```
kubectl api-resources | grep volumesnapshot
```

If CRDs are already present, the output should be similar to the output displayed below. The second column displays the version of the CRD installed (v1 in this case). Ensure that it is the correct version required by the CSI driver being used.

```
volumesnapshotclasses                 vsclass,vsclasses   snapshot.storage.k8s.io/v1                    false        VolumeSnapshotClass
volumesnapshotcontents                vsc,vscs            snapshot.storage.k8s.io/v1                    false        VolumeSnapshotContent
volumesnapshots                       vs                  snapshot.storage.k8s.io/v1                    true         VolumeSnapshot
```

#### Installing CRDs

***

**Be sure to only install one version of VolumeSnapshot CRDs**

1. [Read the external-snapshotter GitHub project documentation](https://github.com/kubernetes-csi/external-snapshotter/tree/master). This is compatible with both v1.19 and v1.20+.
2. Run the following commands to install directly, check the repo for the latest version:

```
RELEASE_VERSION=6.0
```

```
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/release-${RELEASE_VERSION}/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
```

```
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/release-${RELEASE_VERSION}/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
```

```
kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/release-${RELEASE_VERSION}/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
```

</details>

* [x] **Network Access Requirements**

For non-air-gapped environments, the following URLs must be accessed from your Kubernetes cluster.

* [Charts.bitnami.com](http://charts.bitnami.com/)
* [Docker.io](http://docker.io/)
* [charts.helm.sh/stable/](http://charts.helm.sh/stable/)
* [gcr.io](http://gcr.io/)
* [kubernetes.io](http://kubernetes.io/)
* [quay.io](http://quay.io/)
* [github.com](https://github.com/)
* [raw.githubusercontent.com](https://raw.githubusercontent.com/)
* Access to the S3 endpoint if the backup target happens to be S3
* Access to application image repository for image backup/restore

In OpenShift Environments:

* [registry.connect.redhat.com](http://registry.connect.redhat.com/)

- [x] **Network Port Requirements**

If the Kubernetes cluster's control plane and worker nodes are separated by a firewall, then the firewall must allow Ingress traffic on the following port(s)

* 9443

## Verify Prerequisites with the Trilio Preflight Check

{% hint style="success" %}
Make sure your cluster is ready to Install Trilio for Kubernetes by installing the [Preflight Check Plugin](https://docs.trilio.io/kubernetes/4.0.x/krew-plugins/tvk-preflight-checks) and running the [Trilio Preflight Check](https://docs.trilio.io/kubernetes/4.0.x/krew-plugins/tvk-preflight-checks).

Trilio provides a preflight check tool that allows customers to validate their environment for Trilio installation.

The tool generates a report detailing all the requirements and whether they are met or not.

**If you encounter any failures, please send the Preflight Check output to your Trilio Professional Services and Solutions Architect so we may assist you in satisfying any missing requirements before proceeding with the installation.**
{% endhint %}
