Application example: Crossplane is not only for cloud resources (S3, RDS). In v2 you can use it for normal Kubernetes applications. This example defines an XApp that creates a Deployment and a Service—a simple application in the cluster with no cloud MRs.
Same idea as 05-app-with-deployment; this folder is the dedicated application example.
- Crossplane installed (v2)
- function-patch-and-transform installed
- RBAC: Crossplane must be able to create
deploymentsandservices. If not, applyrbac.yaml.
kubectl apply -f rbac.yamlkubectl apply -f xrd.yaml
kubectl apply -f composition.yaml
kubectl apply -f xr.yamlkubectl get xapp -n default
kubectl get deployment,service -n default -l crossplane.io/composite=hello-app
kubectl get pods -n default -l app=hello-appkubectl delete -f xr.yaml
kubectl delete -f composition.yaml
kubectl delete -f xrd.yaml
# optionally: kubectl delete -f rbac.yaml