Hello, I'm curious if its possible to both render ...
# general
Hello, I'm curious if its possible to both render K8s yaml as seen in https://www.pulumi.com/docs/guides/adopting/from_kubernetes/#rendering-kubernetes-yaml and also deploy it with
pulumi up
Not using the same provider. But if you're prepared to manage two stacks, you could create the k8s provider in a conditional guarded by the stack name.
Copy code
var k8sProv;
if (Pulumi.getStack() === "k8sYaml") {
  k8sProv = new k8s.Provider("k8s-yaml-renderer", {
    renderYamlToDirectory: "yaml",
} else {
  k8sProv = new k8s.Provider("k8s-yaml-renderer", {});
🙌 1
Why render it and apply as a ConfigFile instead of applying directly? If you're trying to change the Pulumi apply behaviour, it's better to apply the noAwait annotation than what you're describing.
This is more just informational, sometimes its nice to look at the YAML before it gets applied. I'm teaching folks Kubernetes at my company and this provides them a better understanding