Delete kubernetes/test/test_pod_logs.py

Deleting file with tests added in test/test_pod_los.py
This commit is contained in:
Raj Bhargav 2025-03-18 13:48:38 +05:30 committed by GitHub
parent 3cee537e63
commit 14a2554c18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,33 +0,0 @@
from kubernetes import client, config, watch
pod_name = "demo-bug"
config.load_kube_config()
api = client.CoreV1Api()
namespace = config.list_kube_config_contexts()[1]["context"]["namespace"]
pod_manifest = {
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name": pod_name,
},
"spec": {
"containers": [{"image": "hello-world", "name": pod_name}],
},
}
api.create_namespaced_pod(body=pod_manifest, namespace=namespace)
input("\n\nSubmit when running\n\n")
w = watch.Watch()
for e in w.stream(
api.read_namespaced_pod_log,
name=pod_name,
namespace=namespace,
follow=True,
):
print(e)