08/07/2019, 11:46 AM
Hey guys, with GKE I am setting a cluster stack separately. In the app stack I try to reference using StackReference, on the pulumi platform, both the k8sProvider and kubeconfig are showing as outputs. But if I try to reference these in my app deployment, it does not get located and defaults to kubectls current context. I reference the stack with:
Copy code
export const clusterStackName = config.require("clusterStackName");
const clusterStack = new pulumi.StackReference(clusterStackName);
The stack name uses <organisation>/<project>/<stack> so: ianbarry/infrastructure/ci as an example. I reference this stack like follows in both service and deployment CustomResourceOptions object:
Copy code
provider : new k8s.Provider(clusterStackName,{
    kubeconfig: clusterStack.getOutput("kubeconfig")