# CRD Management

Bluebricks uses server-side apply to manage CRD installation automatically. This ensures CRDs are installed before your chart deploys, preventing common deployment failures and version conflicts.

## CRD support

**Automatic installation:**

* CRDs are automatically installed before chart deployment
* Uses server-side apply for reliable CRD management
* Handles CRD updates and versioning

**CRD sources:**

* `crds/` directory in your chart
* Chart dependencies with CRDs
* External CRD definitions

## CRD directory structure

```
my-helm-chart/
├── Chart.yaml
├── values.yaml
├── templates/
└── crds/                    # CRD definitions
    ├── custom-resource.yaml
    └── another-crd.yaml
```

## How CRD installation works

Bluebricks follows a safe, sequential process to handle CRDs:

1. **Pre-deployment:** Installs CRDs first to make them available
2. **Validation:** Validates CRD syntax and compatibility before proceeding
3. **Chart deployment:** Deploys your chart templates that reference the CRDs
4. **Post-deployment:** Verifies CRD status to confirm successful installation

This order prevents errors where templates try to use CRDs that don't exist yet.

## Best practices

1. **Place CRDs in `crds/` directory**
2. **Use proper CRD versions**
3. **Test CRD installation locally**
4. **Document CRD requirements**

## See also

* [Helm](/docs/orchestration/packages/artifacts-overview/helm.md): full Helm artifact reference
* [Packages overview](/docs/orchestration/packages.md): artifact types and packaging concepts
* [Creating Blueprints](/docs/orchestration/packages/blueprints-overview/creating-blueprints.md): compose artifacts into blueprints


---

# 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://bluebricks.co/docs/orchestration/packages/artifacts-overview/helm/helm-crd-management.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.
