Reputation: 698
I'm new to Kubernetes CRD. My question is as below:
Usually we need to apply a bunch of built-in resources for an Kubernetes app, like few deployments, services, or ingress. Can they be bundled into a single CRD, without implementing any controllers?
For example, I have a myapp-deploy, myapp-service. Instead if applying them separately, I want to define a new CRD "myapp", similar like:
kind: myapp
spec:
deployment: myapp-deploy
service: my-service
Then apply this new CRD.
Is this supported directly in kubernetes, without implementing own controller?
I read the official document and googled as well, but didn't find the answer.
Thanks!
Upvotes: 0
Views: 207
Reputation: 904
It is not possible without writing anything. As per your requirement, you need to use kubernetes operator (https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) which will help you to deploy all your resources using one crd.
Upvotes: 2