Unfortunately "get or create" is not a supported use case for the Kubernetes provider. An explanation is here -
https://github.com/pulumi/pulumi/issues/3364#issuecomment-602902043.
So your idea to create a stack with the namespace and then use StackReference is the best option. It's likely a better longterm option too as you won't have a "one off" stack that contains the namespace where others do not.