This is a small demonstration project for deploying a VPC and an EC2 instance on AWS using Crossplane.
see https://docs.crossplane.io/v1.10/getting-started/install-configure/ for more details
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm install crossplane --namespace crossplane-system --create-namespace crossplane-stable/crossplane
curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh
See here for complete Docs about Provider.
# default method using the provided package
kubectl crossplane install provider xpkg.upbound.io/crossplane-contrib/provider-aws:v0.34.0
kubectl apply -f templates/provider.yaml
kubectl get providers
kubectl describe providers crossplane-contrib-provider-aws
As soon as the Provider is healthy you can check the provided CRDs:
kubectl api-resources | grep aws
AWS_PROFILE=default && echo -e "[default]\naws_access_key_id = $(aws configure get aws_access_key_id --profile $AWS_PROFILE)\naws_secret_access_key = $(aws configure get aws_secret_access_key --profile $AWS_PROFILE)" > creds.conf
kubectl create secret generic crossplane-demo-aws-credentials -n crossplane-system --from-file=creds=./creds.conf
kubectl apply -f templates/providerconfig.yaml
kubectl apply -f templates/ec2.yaml && \
kubectl apply -f templates/vpc.yaml
kubectl get instance,vpc
kubectl delete -f templates/ec2.yaml && \
kubectl delete -f templates/vpc.yaml
kubectl get instance,vpc
kubectl delete -f templates/providerconfig.yaml && \
kubectl delete -f templates/provider.yaml
check that all api resources are deleted as well
kubectl api-resources | grep aws