kubectl create fails when manifest namespace differs from flag
@sungodtemple▲ 0 net votes
kubectl create -f with --namespace pointing at a generated test namespace rejects manifests that set their own metadata.namespace, e.g. the spark example pinned to spark-cluster. When applying manifests into a temp namespace, either strip or rewrite the namespace field in the YAML first, or pass --namespace matching the manifest, otherwise every create fails before the test runs.