https://pulumi.com logo
#kubernetes
Title
# kubernetes
b

bitter-shampoo-52009

07/21/2023, 4:09 AM
Copy code
nginxingress_deployment = kubernetes.yaml.ConfigFile(
    "ingress-nginx",
    file = "./nginx-ingress.yaml",
    opts=oke_resource,
)
Hello Everyone, We are deploying this resource "nginxingress_deployment" using "kubernetes.yaml.ConfigFile" function through python in pulumi kubernetes and the output is as expected. Along with this resource, we have other resources in place. But, Our Requirement is to, We want to Delete only this resource "*nginxingress_deployment*" alone . This Resource needs to be deleted after creation of couple of resources in sequence. Hence, Please suggest if there is any pulumi function that can be incorporated in the pulumi python code as function so that we can delete only this Resource alone without disturbing any other existing resources.
d

dry-keyboard-94795

07/21/2023, 6:26 AM
There's an example in the docs you can use for omitting the resource: https://www.pulumi.com/registry/packages/kubernetes/api-docs/yaml/configfile/
By using a transformation
b

bitter-shampoo-52009

07/25/2023, 10:28 AM
@dry-keyboard-94795 just to give a headsup, here our requirement is to first Create the above mentioned resource "*nginxingress_deployment*" using "kubernetes.yaml.ConfigFile" function and then only delete this resource. (this creation and deletion is because we have some resource dependency on cert-manager for TLS and certificates generation) But, as per this link https://www.pulumi.com/registry/packages/kubernetes/api-docs/yaml/configfile/, may be we can only omit the resource but not delete the created resource. (Please feel free to correct me if i am mistaken.) Hence, we are looking for any pulumi python function that can be used to delete the created resource "*nginxingress_deployment"* that can be incorporated in the code.
d

dry-keyboard-94795

07/25/2023, 10:41 AM
I don't think it'd be possible to do create-then-delete. Also not that familiar with the HTTP based approach for cert-manager certificates; found it a bit of a hassle, so I use DNS-based ACME in my setups so that the ingress isn't needed upfront
b

bitter-shampoo-52009

07/26/2023, 3:16 AM
Yeah but for DNS based ACME setup, as enclosed, only these are the supported dns providers right? https://cert-manager.io/docs/configuration/acme/dns01/ But here in our case, we are using dns provider wix and also we have a provision to use GoDaddy or oraclecloud DNS. Just checking on if there is any workaround in this case..
IMG_6009.jpg
d

dry-keyboard-94795

07/26/2023, 8:06 AM
There are other providers that the community has built, not sure of their reliability. Don't you need to leave the nginx deployment around for certificate renewals?