-
Hello, I am a newbie to fluxcd. I am trying to get going with deploying a simple kubernetes deployment.yaml from an S3 bucket.
---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: Bucket
metadata:
name: fluxcd-bucket
namespace: flux-system
spec:
bucketName: fluxcd-bucket
endpoint: s3.amazonaws.com
interval: 2m0s
provider: aws
region: us-west-2 Inside the s3 bucket fluxcd-bucket, I have the following yaml files in the root
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: aws-test
name: aws-test
namespace: flux-system
spec:
replicas: 1
selector:
matchLabels:
app: aws-test
template:
metadata:
labels:
app: aws-test
spec:
containers:
- image: sdscello/awscli:latest
name: aws-test
ports:
- containerPort: 80
serviceAccountName: source-controller
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: fluxcd-bucket
namespace: flux-system
spec:
interval: 2m0s
prune: true
sourceRef:
kind: Bucket
name: fluxcd-bucket
validation: client
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- fluxcd-bucket-kustomization.yaml
- fluxcd-bucket.yaml
- deployment.yaml Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Never mind, I had not created the kustomization. It seems to have deployed fine |
Beta Was this translation helpful? Give feedback.
Never mind, I had not created the kustomization.
When I did
flux create kustomization fluxcd-buck
--source=Bucket/fluxcd-bucket \
--prune=true
--interval=2m
It seems to have deployed fine