Coder Social home page Coder Social logo

crossplane-demo's Introduction

Crossplane demonstration

This is a small demonstration project for deploying a VPC and an EC2 instance on AWS using Crossplane.

Basic Setup of the Crossplane Environment

see https://docs.crossplane.io/v1.10/getting-started/install-configure/ for more details

Install Crossplane inside Kubernetes Cluster

helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm install crossplane --namespace crossplane-system --create-namespace crossplane-stable/crossplane

Install Crossplane CLI

curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh

Setup for our Demonstration on AWS

⚠️ Setting up AWS CLI is not part of this demonstration. ⚠️

Install AWS Provider

See here for complete Docs about Provider.

Using the CLI

# default method using the provided package
kubectl crossplane install provider xpkg.upbound.io/crossplane-contrib/provider-aws:v0.34.0

Using the Template

kubectl apply -f templates/provider.yaml

Check the installed Provider

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

Create Secrets for accessing Provider

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

Configure the Provider

kubectl apply -f templates/providerconfig.yaml

Create the infrastructure

kubectl apply -f templates/ec2.yaml && \
kubectl apply -f templates/vpc.yaml

Check created infrastructure

kubectl get instance,vpc

Delete infrastructure

kubectl delete -f templates/ec2.yaml && \
kubectl delete -f templates/vpc.yaml

Check deleted infrastructure

kubectl get instance,vpc

Remove Provider and ProviderConfig

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

crossplane-demo's People

Contributors

christianhuth avatar

Stargazers

Roman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.