Getting started
Preqrequisites
- A kubernetes Cluster (Tested with version 1.25.4)
- an IAM aws user
- Helm 3 installed
- ArgoCD (optional)
Installation
- Clone this repo
- Install the crossplane helm chart
- Install your first provider
- Create a secret with the aws credentials
- Install the helm chart
Install the crossplane helm chart
helm repo add \
crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm install crossplane \
crossplane-stable/crossplane \
--namespace crossplane-system \
--create-namespace
Create a secret with the aws credentials
kubectl create secret generic aws-secret --from-file creds=$HOME/.aws/credentials --namespace crossplane-system
Install your first provider
cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-aws-s3
spec:
package: xpkg.upbound.io/upbound/provider-aws-s3:v0.40.0
EOF
Adding secret to the provider
cat <<EOF | kubectl apply -f -
apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: aws-secret
key: creds
EOF
Create your first bucket
bucket=$(echo "crossplane-bucket-"$(head -n 4096 /dev/urandom | openssl sha1 | tail -c 10))
region="us-east-1"
cat <<EOF | kubectl apply -f -
apiVersion: s3.aws.upbound.io/v1beta1
kind: Bucket
metadata:
name: $bucket
spec:
forProvider:
region: $region
providerConfigRef:
name: default
EOF
Great, now you have a bucket
Debug
kubectl get providers
kubectl get managed