Create a Bundle Resource
Bundles are automatically created by Fleet when a
GitRepo is created. In most cases
Bundles should not be created
manually by the user. If you want to deploy resources from a git repository use a
If you want to deploy resources without a git repository follow this guide to create a
When creating a
GitRepo Fleet will fetch the resources from a git repository, and add them to a Bundle.
When creating a
Bundle resources need to be explicitly specified in the
Resources can be compressed with gz. See here
an example of how Rancher uses compression in go code.
If you would like to deploy in downstream clusters, you need to define targets. Targets work similarly to targets in
See Mapping to Downstream Clusters.
The following example creates a nginx
Deployment in the local cluster:
# Any name can be used here
# For single cluster use fleet-local, otherwise use the namespace of
# your choosing
# List of all resources that will be deployed
- content: |
- name: nginx
- containerPort: 80
- clusterName: local
Helm options related to downloading the helm chart will be ignored. The helm chart is downloaded by the fleet-cli, which creates the bundles. The bundle has to contain all the resources from the chart. Therefore the bundle will ignore:
You can't use a
fleet.yaml in resources, it is only used by the fleet-cli to create bundles.
spec.targetRestrictions field is not useful, as it is an allow list for targets specified in
spec.targets. It is not needed, since
targets are explicitly given in a bundle and an empty
targetRestrictions defaults to allow.