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

breezy-bear-50708

08/20/2021, 12:38 PM
Hi, when using the golang bindings it only seems to create local resource files rather than apply them to my cluster... what am I missing?
my code looks like
Copy code
kubeconf := createKubeConfig(gkeCluster)
	clusterProvider, err := kubernetes.NewProvider(d.ctx, "gke-cluster", &kubernetes.ProviderArgs{
		Kubeconfig: kubeconf,
	})
	if err != nil {
		return err
	}

	ns, err := corev1.NewNamespace(d.ctx, "kube-ready", &corev1.NamespaceArgs{
		Metadata:   metav1.ObjectMetaArgs{
			Name:   pulumi.String("kube-ready"),
		},
	}, pulumi.Provider(clusterProvider))
	if err != nil {
		return err
	}
// and so on
it works if I use the default provider (local kubeconfig), but whenever I use the provider it just renders locally 😕
huh I think it's a bug, it's erroneously going into yaml render mode
yeah definitely a bug, I can fix it by setting RenderToYamlDirectory to ""
4 Views