diff --git a/stack_orchestrator/deploy/k8s/deploy_k8s.py b/stack_orchestrator/deploy/k8s/deploy_k8s.py index 915b2cd7..90ad7655 100644 --- a/stack_orchestrator/deploy/k8s/deploy_k8s.py +++ b/stack_orchestrator/deploy/k8s/deploy_k8s.py @@ -263,6 +263,11 @@ class K8sDeployer(Deployer): print(f"{cfg_rsp}") def _create_deployment(self): + # Skip if there are no pods to deploy (e.g. jobs-only stacks) + if not self.cluster_info.parsed_pod_yaml_map: + if opts.o.debug: + print("No pods defined, skipping Deployment creation") + return # Process compose files into a Deployment deployment = self.cluster_info.get_deployment( image_pull_policy=None if self.is_kind() else "Always"