Deleting a bucket ΒΆ
Delete unused buckets to avoid incurring unnecessary costs. A bucket is deleted by enabling cascading deletion, and deleting the application.
Enable cascading/automatic deletion ΒΆ
For deletion of the application to automatically delete the bucket, set cascadingDelete to true in your Nais application manifest. Don't worry, the bucket won't be deleted if it contains files.
yaml
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: <MY-APP>
...
spec:
...
gcp:
buckets:
- name: <MY-BUCKET>
cascadingDelete: true
retentionPeriodDays: 30
lifecycleCondition:
age: 7
createdBefore: 2020-01-01
daysSinceCustomTime: 2
numNewerVersions: 2
withState: ANYDelete your application ΒΆ
Delete your application resource.
bash
kubectl delete application <MY-APP>