diff --git a/src/kubectl-application-shell.py b/src/kubectl-application-shell.py index a87f267..b4282bf 100644 --- a/src/kubectl-application-shell.py +++ b/src/kubectl-application-shell.py @@ -56,7 +56,7 @@ def main(namespace: str, deployment: str, size: Optional[str] = typer.Argument(N deployment_info = subprocess.run(['kubectl', 'get', 'deployment', f"--namespace={namespace}", f"{deployment}", "-o", 'json'], capture_output=True, text=True).stdout container_name = json.loads(deployment_info)['spec']['template']['spec']['containers'][0]['name'] image = json.loads(deployment_info)['spec']['template']['spec']['containers'][0]['image'] - env_from = json.loads(deployment_info)['spec']['template']['spec']['containers'][0]['envFrom'] + env_from = json.loads(deployment_info)['spec']['template']['spec']['containers'][0].get('envFrom', None) annotations = json.loads(deployment_info)['metadata']['annotations'] kubectl_overrides = json.dumps({ "metadata": {