Closed
Description
Scenario
I'm trying to check if a specific files exists in my pod and assert it on my end using a direct string to string comparison.
Code Snippet
cmd = "[ -f /etc/hosts ] && echo 'True' || echo 'False'"
response = kubernetes_client.connect_post_namespaced_pod_exec(pod, kubernetes_namespace, stderr=True, stdin=True, stdout=True, command=cmd, tty=False)
is_file = response.strip()
print is_file
print [ord(c) for c in is_file]
print len(is_file)
Output
True
[1, 1, 84, 114, 117, 101]
6
Problem
Before in kubernetes v1.0.0.b1, I did not have those extra characters in the beginning of my response but with the latest v1.0.0b3 I do. Anyone know why this is the case?
Metadata
Metadata
Assignees
Labels
No labels