https://pulumi.com logo
Title
a

ambitious-continent-10899

02/13/2023, 10:25 PM
#typescript #azure Hello, I am attempting to modify a Kubernetes Configuration by rendering a custom YAML. Looking over this documentation: https://www.pulumi.com/docs/guides/adopting/from_kubernetes/ the area that talks about
Rendering Kubernetes YAML
should have my answer, however that does't let wright my own YAML, which is what I need. This is what my YAML looks like:
b

billowy-army-68599

02/13/2023, 10:27 PM
are you saying you want to apply this CRD to your Kubernetes cluster?
a

ambitious-continent-10899

02/13/2023, 10:29 PM
Yes. And it's not a ConfigMap nor a ConfigGroup
b

billowy-army-68599

02/13/2023, 10:31 PM
this is a custom resource defined by a custom resource definition, you’ll need to use this kubernetes resource: https://www.pulumi.com/registry/packages/kubernetes/api-docs/apiextensions/customresource/
a

ambitious-continent-10899

02/13/2023, 10:36 PM
ah. It might. Let give it a try. Thank you!
Can I use renderYamlToDirectory to wright into the manifest?
b

billowy-army-68599

02/13/2023, 11:12 PM
Yes
a

ambitious-continent-10899

02/14/2023, 10:07 PM
@billowy-army-68599 Is the
renderYamlToDirectory
necessary for modifying the k8s configuration?
b

billowy-army-68599

02/14/2023, 10:08 PM
I’m not following?
a

ambitious-continent-10899

02/14/2023, 10:11 PM
it specifies the renderYamlToDirectory in oder to write under k8s manifest. Is that necessary? or just for debugging purposes ?
b

billowy-army-68599

02/14/2023, 10:13 PM
what exactly are you treying to do?
a

ambitious-continent-10899

02/14/2023, 10:15 PM
I am attempting to modify the k8s configuration. This is what would be the equivalent: https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_apply/
kubectl apply
b

billowy-army-68599

02/14/2023, 10:19 PM
oh, for that you need server side apply: https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/ Render yaml to directory just outputs the yaml for to use kubectl apply yourself