# Image Builder

> Build container images within the Kubernetes cluster

- **Category**: Cloud
- **Subcategory**: Advanced
- **Canonical URL**: https://designpattern.fyi/patterns/k8s_image_builder/

---

## Description
The Image Builder pattern builds container images within the Kubernetes cluster rather than externally. This enables chained builds, where the output of one build becomes input to another, and can be used with tools like Kaniko, BuildKit, or Knative Build. This brings CI/CD pipelines closer to the deployment environment.


## Use Cases
Use when you want to build images within the cluster or when you need to implement chained build processes.





## Trade-offs


### Advantages

- Builds within cluster environment

- Enables chained builds

- Reduces external dependencies

- Can integrate with cluster resources




### Considerations & Drawbacks

- Requires additional cluster resources

- May be slower than external builds

- Security considerations for build tools







---
**Reference**: [Original Source](https://github.com/k8spatterns/examples/tree/master/advanced/ImageBuilder)

