- provider.yml - Install Kubernetes provider
- provider-config.yml - provider config for kubernetes
- xrd.yml - Crossplane Resource Definition, schema for create custom Kinds
- xr.yml - Crossplane Resource, Definition for managed resources you use
- xrc.yml - Crossplane ResourceClaim, usage of custom XR
Install Crossplane
kubectl create namespace crossplane-system
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm install crossplane --namespace crossplane-system crossplane-stable/crossplane
Install Crossplane Kubectl plugin
curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh
mv kubectl-crossplane /usr/local/bin
Run example
kubectl apply -f provider.yml
kubectl apply -f provider-config.yml
kubectl apply -f xrd.yml
kubectl apply -f xr.yml
kubectl apply -f xrc.yml
Testing
kubectl get pods -n <NAME PARAMETER>
NAME READY STATUS RESTARTS AGE
crossplane-apply 1/1 Running 0 61m
nginx 1/1 Running 0 60m
kubectl port-forward -n <NAME PARAMETER> pod/nginx 8080:80
curl localhost:8080