chilly-sunset-85353
12/30/2025, 9:25 AMvar myObj = new SomeKubernetesObject( "my-k8s-object", snip );
var myOtherObject = new SomeOtherResource( "my-other-object", new SomeOtherResourceArgs {
ObjectName = myObj.Metadata.Apply( m => m.Name ),
} );chilly-sunset-85353
12/30/2025, 9:27 AMPreview failed: resource 'my-k8s-object-00af0ebd' does not existchilly-sunset-85353
12/30/2025, 9:28 AMpulumi upchilly-sunset-85353
12/30/2025, 9:29 AMchilly-sunset-85353
12/30/2025, 9:30 AMchilly-sunset-85353
12/30/2025, 9:31 AMmyObj.Id, then the error doesn't occurchilly-sunset-85353
12/30/2025, 9:32 AMchilly-sunset-85353
12/30/2025, 9:32 AMchilly-sunset-85353
12/30/2025, 9:33 AMchilly-sunset-85353
12/30/2025, 9:36 AMbrave-planet-10645
12/30/2025, 2:20 PMmyObj has been created. it might be because you're using something generated by crd2pulumi but it's still a resource...
I'm just checking that there's a more general bug in the kubernetes provider, but do you have a simple CRD that you can target with crd2pulumi so we can reproduce this in an issue?brave-planet-10645
12/30/2025, 3:36 PMchilly-sunset-85353
12/30/2025, 9:21 PMchilly-sunset-85353
12/30/2025, 10:04 PMchilly-sunset-85353
12/30/2025, 10:06 PMchilly-sunset-85353
12/30/2025, 10:07 PMchilly-sunset-85353
12/30/2025, 10:08 PMchilly-sunset-85353
12/30/2025, 10:10 PMchilly-sunset-85353
12/30/2025, 10:14 PMchilly-sunset-85353
12/30/2025, 10:14 PMchilly-sunset-85353
12/30/2025, 10:19 PMchilly-sunset-85353
12/30/2025, 10:21 PMsteep-finland-70985
12/31/2025, 2:52 PMMandatory: Only spec.ports[].port
Highly Recommended:
spec.selector - To route traffic to specific pods
spec.ports[].targetPort - To specify the pod's port
spec.type - To control how the service is exposedsteep-finland-70985
12/31/2025, 2:55 PMchilly-sunset-85353
12/31/2025, 3:03 PMsteep-finland-70985
12/31/2025, 3:55 PMpulumi up command for now after replicating the repo.
2. Service Creation missing port as mandatory param compared with exemplary service creation
# Create service with mandatory + recommended parameters
service = kubernetes.core.v1.Service(
"nginx-service",
spec=kubernetes.core.v1.ServiceSpecArgs(
selector=app_labels, # Match the deployment labels
ports=[kubernetes.core.v1.ServicePortArgs(
port=80, # MANDATORY: External port
target_port=80, # Pod's port
protocol="TCP",
)],
type="LoadBalancer", # ClusterIP, NodePort, or LoadBalancer
),
3. C# example is already posted above.
4. Sure, will address/test with SecretStore.Get call after we fix the service creation call.chilly-sunset-85353
12/31/2025, 4:07 PMpulumi preview results in the error.
I didn't build the repro with applying in mind because the error is happening during preview. So I'm not surprised the service is invalid, but that's not relevant because I'm not actually creating it. You don't need to apply the stack to see the error. The fact you're getting to the apply stage means you're not getting the error which is weird. I'm not able to apply the stack at all.steep-finland-70985
12/31/2025, 4:50 PMpulumi preview looks good.
2. Using minikube to start the local cluster.
3. Can see crd-test ns running in cluster after pulumi up command but failed while creating service.
crd-bug-repro % kubectl get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
crd-test external-secrets-568b5747b6-9txsk 1/1 Running 0 36s
crd-test external-secrets-cert-controller-79cbcf455f-8q85d 1/1 Running 0 36s
crd-test external-secrets-webhook-7d79c46458-w8jbd 1/1 Running 0 36s
kube-system coredns-668d6bf9bc-72n5k 1/1 Running 2 (15h ago) 47d
kube-system etcd-minikube 1/1 Running 2 (15h ago) 47d
kube-system kube-apiserver-minikube 1/1 Running 2 (15h ago) 47d
kube-system kube-controller-manager-minikube 1/1 Running 2 (15h ago) 47d
kube-system kube-proxy-trctx 1/1 Running 2 (15h ago) 47d
kube-system kube-scheduler-minikube 1/1 Running 2 (15h ago) 47d
kube-system storage-provisioner 1/1 Running 7 (6m43s ago) 47dchilly-sunset-85353
12/31/2025, 5:10 PMchilly-sunset-85353
12/31/2025, 5:10 PM// uncomment the below lines to get error: Preview failed: resource 'crd-test/secret-store-10e7357d' does not existchilly-sunset-85353
12/31/2025, 5:11 PMvar brokenRead = secretStore.Metadata.Apply( s =>
SecretStore.Get( "secret-store-read", $"{s.Namespace}/{s.Name}", new CustomResourceOptions { Provider = k8sProvider } )
.Spec
.Apply( s => s.Provider.Fake.Data )
);
this is the broken readchilly-sunset-85353
12/31/2025, 5:11 PMchilly-sunset-85353
12/31/2025, 5:12 PMthe broken bit is commented out in the git repoforgot I did this, mb
steep-finland-70985
12/31/2025, 5:26 PMcrd-bug-repro % git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree cleanchilly-sunset-85353
12/31/2025, 6:14 PMsteep-finland-70985
12/31/2025, 7:03 PMsteep-finland-70985
01/02/2026, 2:32 PMsteep-finland-70985
01/02/2026, 2:35 PMbrave-planet-10645
01/02/2026, 2:48 PMmetadata.name and the metadata.namespace values are generated by the Pulumi engine. That is why these are known straight away. They don't come from the cloud service.
The way to do what you're trying to do is to wrap the namespace/name ID value in Output.Format which will wrap an Output<T> around these values and it should all work properly.
So something like this:
var brokenRead = SecretStore.Get("secret-store-get", Output.Format($"{secretStore.Metadata.Apply(x => {
return string.Format($"{x.Namespace}/{x.Name}");
} )}"));
will work. Don't forget the return as otherwise you won't get anything
Having said that, when I run that and add it to the return statement to see what the values are in the CLI:
var brokenRead = SecretStore.Get("secret-store-get", Output.Format($"{secretStore.Metadata.Apply(x => {
return string.Format($"{x.Namespace}/{x.Name}");
} )}"));
return new Dictionary<string, object?>
{
["br"] = brokenRead.Spec.Apply(x => x.Provider.Fake.Data)
};
brave-planet-10645
01/02/2026, 2:52 PMDependsOn resource option:
var brokenRead = secretStore.Metadata.Apply( s =>
SecretStore.Get( "secret-store-read", $"{s.Namespace}/{s.Name}", new CustomResourceOptions { Provider = k8sProvider, DependsOn = secretStore } )
.Spec
.Apply( s => s.Provider.Fake.Data )
);
That is identical to the code you sent over, except I've added DependsOn = secretStore
And now I can see the data that you've added to the secretStore resource as wellchilly-sunset-85353
01/02/2026, 7:42 PM