# IPFS

IPFS is a distributed system for storing and accessing files, websites, applications, and data.

We've extended Kubernetes with `Peer` and `ClusterPeer` custom resources which can be used to deploy IPFS peers, swarms, and clusters from the given spec.

### Peer

`Peer` is an ipfs peer running `go-ipfs` client and connecting to the public ipfs swarm or a private swarm secured by swarm key. Here's an example of a very basic ipfs peer connecting to the public ipfs swarm.

```yaml
apiVersion: ipfs.kotal.io/v1alpha1
kind: Peer
metadata:
  Name: simple-peer
spec: {}
```

For all the fields associated with the `Peer` API resource:

```bash
kubectl explain peers --api-version ipfs.kotal.io/v1alpha1
kubectl explain peers.spec --api-version ipfs.kotal.io/v1alpha1
```

Full ipfs peer reference is documented [here](/reference/ipfs.md).

### ClusterPeer

`ClusterPeer` is an ipfs cluster peer running `ipfs-cluster-service` client, connecting to ipfs peer and optional bootstrap cluster peer(s). `ClusterPeer`s provide data orchestration across a swarm of IPFS daemons by allocating, replicating and tracking a global pinset distributed among multiple peers. Here's an example of cluster peer connecting to ipfs peer.

```yaml
apiVersion: ipfs.kotal.io/v1alpha1
kind: ClusterPeer
metadata:
  Name: simple-cluster-peer
spec:
  peerEndpoint: /dns4/simple-peer/tcp/5001
```

For all the fields associated with the `ClusterPeer` API resource:

```bash
kubectl explain clusterpeers --api-version ipfs.kotal.io/v1alpha1
kubectl explain clusterpeers.spec --api-version ipfs.kotal.io/v1alpha1
```

Full ipfs cluster peer reference is documented [here](/reference/ipfs.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kotal.co/tutorials/ipfs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
