Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl exec with non-interactive shell doesn't work in 9.2 #12551

Closed
webvictim opened this issue May 10, 2022 · 3 comments · Fixed by #12541
Closed

kubectl exec with non-interactive shell doesn't work in 9.2 #12551

webvictim opened this issue May 10, 2022 · 3 comments · Fixed by #12541

Comments

@webvictim
Copy link
Contributor

Expected behavior:

kubectl exec pod -- hostname should work.

Current behavior:

kubectl exec pod -- hostname hangs:

» kubectl -v=10 -n teleport-kube-agent-gus exec statefulset/teleport-kube-agent-gus -- hostname
I0510 13:19:59.014772   15735 loader.go:372] Config loaded from file:  /Users/gus/.kube/config
I0510 13:19:59.017553   15735 cached_discovery.go:114] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/servergroups.json
I0510 13:19:59.018325   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/vpcresources.k8s.aws/v1beta1/serverresources.json
I0510 13:19:59.018368   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/policy/v1beta1/serverresources.json
I0510 13:19:59.018369   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/coordination.k8s.io/v1/serverresources.json
I0510 13:19:59.019263   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/autoscaling/v2beta1/serverresources.json
I0510 13:19:59.019293   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/scheduling.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019316   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authentication.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019384   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/discovery.k8s.io/v1/serverresources.json
I0510 13:19:59.019440   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authentication.k8s.io/v1/serverresources.json
I0510 13:19:59.019526   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/networking.k8s.io/v1/serverresources.json
I0510 13:19:59.019564   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/acme.cert-manager.io/v1/serverresources.json
I0510 13:19:59.019602   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiregistration.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019612   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/discovery.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019615   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/batch/v1/serverresources.json
I0510 13:19:59.019636   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/node.k8s.io/v1/serverresources.json
I0510 13:19:59.019660   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authorization.k8s.io/v1/serverresources.json
I0510 13:19:59.019690   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/autoscaling/v1/serverresources.json
I0510 13:19:59.019742   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/networking.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019776   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/batch/v1beta1/serverresources.json
I0510 13:19:59.019756   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/v1/serverresources.json
I0510 13:19:59.019801   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/node.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019793   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/rbac.authorization.k8s.io/v1/serverresources.json
I0510 13:19:59.019806   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authorization.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019815   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/flowcontrol.apiserver.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019871   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/extensions/v1beta1/serverresources.json
I0510 13:19:59.019857   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiregistration.k8s.io/v1/serverresources.json
I0510 13:19:59.019946   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/certificates.k8s.io/v1/serverresources.json
I0510 13:19:59.019955   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiextensions.k8s.io/v1/serverresources.json
I0510 13:19:59.019984   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/scheduling.k8s.io/v1/serverresources.json
I0510 13:19:59.019988   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiextensions.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.020025   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/admissionregistration.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.020036   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/policy/v1/serverresources.json
I0510 13:19:59.020037   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apps/v1/serverresources.json
I0510 13:19:59.020086   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/rbac.authorization.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.020089   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/events.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.019624   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/certificates.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.020130   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/autoscaling/v2beta2/serverresources.json
I0510 13:19:59.020144   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/coordination.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.020145   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/crd.k8s.amazonaws.com/v1alpha1/serverresources.json
I0510 13:19:59.020156   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/events.k8s.io/v1/serverresources.json
I0510 13:19:59.020176   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/storage.k8s.io/v1/serverresources.json
I0510 13:19:59.020227   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/storage.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.020237   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/admissionregistration.k8s.io/v1/serverresources.json
I0510 13:19:59.020475   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/cert-manager.io/v1/serverresources.json
I0510 13:19:59.020941   15735 cached_discovery.go:114] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/servergroups.json
I0510 13:19:59.021138   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authentication.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021164   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/discovery.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021205   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiextensions.k8s.io/v1/serverresources.json
I0510 13:19:59.021211   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/node.k8s.io/v1/serverresources.json
I0510 13:19:59.021242   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/coordination.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021259   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/extensions/v1beta1/serverresources.json
I0510 13:19:59.021277   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/events.k8s.io/v1/serverresources.json
I0510 13:19:59.021286   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/discovery.k8s.io/v1/serverresources.json
I0510 13:19:59.021292   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apps/v1/serverresources.json
I0510 13:19:59.021297   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/storage.k8s.io/v1/serverresources.json
I0510 13:19:59.021301   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/autoscaling/v2beta1/serverresources.json
I0510 13:19:59.021325   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/node.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021358   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiregistration.k8s.io/v1/serverresources.json
I0510 13:19:59.021371   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/networking.k8s.io/v1/serverresources.json
I0510 13:19:59.021379   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/events.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021399   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/certificates.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021408   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiregistration.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021417   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/autoscaling/v1/serverresources.json
I0510 13:19:59.021401   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authorization.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021381   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/apiextensions.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021442   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/policy/v1/serverresources.json
I0510 13:19:59.021381   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/networking.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021374   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/cert-manager.io/v1/serverresources.json
I0510 13:19:59.021544   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/scheduling.k8s.io/v1/serverresources.json
I0510 13:19:59.021551   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/certificates.k8s.io/v1/serverresources.json
I0510 13:19:59.021576   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/rbac.authorization.k8s.io/v1/serverresources.json
I0510 13:19:59.021464   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/storage.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021588   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/autoscaling/v2beta2/serverresources.json
I0510 13:19:59.021599   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/crd.k8s.amazonaws.com/v1alpha1/serverresources.json
I0510 13:19:59.021601   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/admissionregistration.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021460   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/flowcontrol.apiserver.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021618   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/policy/v1beta1/serverresources.json
I0510 13:19:59.021481   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authentication.k8s.io/v1/serverresources.json
I0510 13:19:59.021490   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/coordination.k8s.io/v1/serverresources.json
I0510 13:19:59.021498   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/vpcresources.k8s.aws/v1beta1/serverresources.json
I0510 13:19:59.021497   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/scheduling.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021518   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/batch/v1beta1/serverresources.json
I0510 13:19:59.021518   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/authorization.k8s.io/v1/serverresources.json
I0510 13:19:59.021533   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/batch/v1/serverresources.json
I0510 13:19:59.021536   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/rbac.authorization.k8s.io/v1beta1/serverresources.json
I0510 13:19:59.021625   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/admissionregistration.k8s.io/v1/serverresources.json
I0510 13:19:59.021686   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/acme.cert-manager.io/v1/serverresources.json
I0510 13:19:59.021774   15735 cached_discovery.go:71] returning cached discovery info from /Users/gus/.kube/cache/discovery/gus.teleportdemo.com_3026/v1/serverresources.json
I0510 13:19:59.025349   15735 round_trippers.go:466] curl -v -XGET  -H "User-Agent: kubectl/v1.23.5 (darwin/amd64) kubernetes/c285e78" -H "Accept: application/json, */*" 'https://gus.teleportdemo.com:3026/apis/apps/v1/namespaces/teleport-kube-agent-gus/statefulsets/teleport-kube-agent-gus'
I0510 13:19:59.078607   15735 round_trippers.go:495] HTTP Trace: DNS Lookup for gus.teleportdemo.com resolved to [{52.14.45.73 }]
I0510 13:19:59.116868   15735 round_trippers.go:510] HTTP Trace: Dial to tcp:52.14.45.73:3026 succeed
I0510 13:19:59.226426   15735 round_trippers.go:570] HTTP Statistics: DNSLookup 2 ms Dial 37 ms TLSHandshake 43 ms ServerProcessing 65 ms Duration 201 ms
I0510 13:19:59.226444   15735 round_trippers.go:577] Response Headers:
I0510 13:19:59.226450   15735 round_trippers.go:580]     Cache-Control: no-cache, no-store, must-revalidate
I0510 13:19:59.226455   15735 round_trippers.go:580]     Cache-Control: no-cache, no-store, must-revalidate
I0510 13:19:59.226458   15735 round_trippers.go:580]     Cache-Control: no-cache, private
I0510 13:19:59.226462   15735 round_trippers.go:580]     Content-Type: application/json
I0510 13:19:59.226466   15735 round_trippers.go:580]     Date: Tue, 10 May 2022 16:19:59 GMT
I0510 13:19:59.226470   15735 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: ea917245-a9bd-4f7a-bb79-7a5e91cbe4d1
I0510 13:19:59.226474   15735 round_trippers.go:580]     Audit-Id: 3bc06d5a-be0a-4ae1-b0e7-12f206e86d17
I0510 13:19:59.226477   15735 round_trippers.go:580]     Expires: 0
I0510 13:19:59.226481   15735 round_trippers.go:580]     Expires: 0
I0510 13:19:59.226492   15735 round_trippers.go:580]     Pragma: no-cache
I0510 13:19:59.226496   15735 round_trippers.go:580]     Pragma: no-cache
I0510 13:19:59.226500   15735 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 125dc083-9d02-402f-9380-b741795a2570
I0510 13:19:59.228322   15735 request.go:1181] Response Body: {"kind":"StatefulSet","apiVersion":"apps/v1","metadata":{"name":"teleport-kube-agent-gus","namespace":"teleport-kube-agent-gus","uid":"cbd0cf9d-59eb-45c3-9191-3862eb34c6d3","resourceVersion":"36690397","generation":2,"creationTimestamp":"2022-01-28T18:25:00Z","labels":{"app":"teleport-kube-agent-gus","app.kubernetes.io/managed-by":"Helm"},"annotations":{"meta.helm.sh/release-name":"teleport-kube-agent-gus","meta.helm.sh/release-namespace":"teleport-kube-agent-gus"},"managedFields":[{"manager":"helm","operation":"Update","apiVersion":"apps/v1","time":"2022-01-28T18:25:00Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:meta.helm.sh/release-name":{},"f:meta.helm.sh/release-namespace":{}},"f:labels":{".":{},"f:app":{},"f:app.kubernetes.io/managed-by":{}}},"f:spec":{"f:podManagementPolicy":{},"f:replicas":{},"f:revisionHistoryLimit":{},"f:selector":{},"f:serviceName":{},"f:template":{"f:metadata":{"f:annotations":{".":{},"f:checksum/config":{},"f:eks.amazonaws.com/role-arn":{}},"f:labels":{".":{},"f:app":{}}},"f:spec":{"f:containers":{"k:{\"name\":\"teleport\"}":{".":{},"f:args":{},"f:image":{},"f:imagePullPolicy":{},"f:livenessProbe":{".":{},"f:failureThreshold":{},"f:httpGet":{".":{},"f:path":{},"f:port":{},"f:scheme":{}},"f:initialDelaySeconds":{},"f:periodSeconds":{},"f:successThreshold":{},"f:timeoutSeconds":{}},"f:name":{},"f:ports":{".":{},"k:{\"containerPort\":3000,\"protocol\":\"TCP\"}":{".":{},"f:containerPort":{},"f:name":{},"f:protocol":{}}},"f:readinessProbe":{".":{},"f:failureThreshold":{},"f:httpGet":{".":{},"f:path":{},"f:port":{},"f:scheme":{}},"f:initialDelaySeconds":{},"f:periodSeconds":{},"f:successThreshold":{},"f:timeoutSeconds":{}},"f:resources":{},"f:securityContext":{".":{},"f:allowPrivilegeEscalation":{},"f:capabilities":{".":{},"f:drop":{}},"f:readOnlyRootFilesystem":{},"f:runAsNonRoot":{},"f:runAsUser":{}},"f:terminationMessagePath":{},"f:terminationMessagePolicy":{},"f:volumeMounts":{".":{},"k:{\"mountPath\":\"/etc/teleport\"}":{".":{},"f:mountPath":{},"f:name":{},"f:readOnly":{}},"k:{\"mountPath\":\"/etc/teleport-secrets\"}":{".":{},"f:mountPath":{},"f:name":{},"f:readOnly":{}},"k:{\"mountPath\":\"/var/lib/teleport\"}":{".":{},"f:mountPath":{},"f:name":{}}}}},"f:dnsPolicy":{},"f:restartPolicy":{},"f:schedulerName":{},"f:securityContext":{".":{},"f:fsGroup":{}},"f:serviceAccount":{},"f:serviceAccountName":{},"f:terminationGracePeriodSeconds":{},"f:volumes":{".":{},"k:{\"name\":\"auth-token\"}":{".":{},"f:name":{},"f:secret":{".":{},"f:defaultMode":{},"f:secretName":{}}},"k:{\"name\":\"config\"}":{".":{},"f:configMap":{".":{},"f:defaultMode":{},"f:name":{}},"f:name":{}}}}},"f:updateStrategy":{"f:rollingUpdate":{".":{},"f:partition":{}},"f:type":{}},"f:volumeClaimTemplates":{}}}},{"manager":"kube-controller-manager","operation":"Update","apiVersion":"apps/v1","time":"2022-05-09T16:36:07Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:collisionCount":{},"f:currentReplicas":{},"f:currentRevision":{},"f:observedGeneration":{},"f:readyReplicas":{},"f:replicas":{},"f:updateRevision":{},"f:updatedReplicas":{}}}}]},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"teleport-kube-agent-gus"}},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"teleport-kube-agent-gus"},"annotations":{"checksum/config":"f7c4d474d8c6e2c5c447d7bba2bd81b6fb22427f3bbd5d42e0dc439aa0a94a0c","eks.amazonaws.com/role-arn":"arn:aws:iam::165258854585:role/PurpleAgentAssumeRolePod"}},"spec":{"volumes":[{"name":"config","configMap":{"name":"teleport-kube-agent-gus","defaultMode":420}},{"name":"auth-token","secret":{"secretName":"teleport-kube-agent-join-token","defaultMode":420}}],"containers":[{"name":"teleport","image":"quay.io/gravitational/teleport:9.2.1","args":["--diag-addr=0.0.0.0:3000"],"ports":[{"name":"diag","containerPort":3000,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"config","readOnly":true,"mountPath":"/etc/teleport"},{"name":"auth-token","readOnly":true,"mountPath":"/etc/teleport-secrets"},{"name":"teleport-kube-agent-gus-teleport-data","mountPath":"/var/lib/teleport"}],"livenessProbe":{"httpGet":{"path":"/readyz","port":"diag","scheme":"HTTP"},"initialDelaySeconds":5,"timeoutSeconds":1,"periodSeconds":5,"successThreshold":1,"failureThreshold":6},"readinessProbe":{"httpGet":{"path":"/readyz","port":"diag","scheme":"HTTP"},"initialDelaySeconds":5,"timeoutSeconds":1,"periodSeconds":5,"successThreshold":1,"failureThreshold":12},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent","securityContext":{"capabilities":{"drop":["all"]},"runAsUser":9807,"runAsNonRoot":true,"readOnlyRootFilesystem":true,"allowPrivilegeEscalation":false}}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"teleport-kube-agent-gus","serviceAccount":"teleport-kube-agent-gus","securityContext":{"fsGroup":9807},"schedulerName":"default-scheduler"}},"volumeClaimTemplates":[{"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"teleport-kube-agent-gus-teleport-data","creationTimestamp":null},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"128Mi"}},"volumeMode":"Filesystem"},"status":{"phase":"Pending"}}],"serviceName":"teleport-kube-agent-gus","podManagementPolicy":"OrderedReady","updateStrategy":{"type":"RollingUpdate","rollingUpdate":{"partition":0}},"revisionHistoryLimit":10},"status":{"observedGeneration":2,"replicas":1,"readyReplicas":1,"currentReplicas":1,"updatedReplicas":1,"currentRevision":"teleport-kube-agent-gus-7586c894c6","updateRevision":"teleport-kube-agent-gus-7586c894c6","collisionCount":0}}
I0510 13:19:59.232256   15735 round_trippers.go:466] curl -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: kubectl/v1.23.5 (darwin/amd64) kubernetes/c285e78" 'https://gus.teleportdemo.com:3026/api/v1/namespaces/teleport-kube-agent-gus/pods?labelSelector=app%3Dteleport-kube-agent-gus'
I0510 13:19:59.233736   15735 round_trippers.go:495] HTTP Trace: DNS Lookup for gus.teleportdemo.com resolved to [{52.14.45.73 }]
I0510 13:19:59.274860   15735 round_trippers.go:510] HTTP Trace: Dial to tcp:52.14.45.73:3026 succeed
I0510 13:19:59.398049   15735 round_trippers.go:570] HTTP Statistics: DNSLookup 1 ms Dial 41 ms TLSHandshake 47 ms ServerProcessing 75 ms Duration 165 ms
I0510 13:19:59.398066   15735 round_trippers.go:577] Response Headers:
I0510 13:19:59.398077   15735 round_trippers.go:580]     Cache-Control: no-cache, no-store, must-revalidate
I0510 13:19:59.398083   15735 round_trippers.go:580]     Cache-Control: no-cache, no-store, must-revalidate
I0510 13:19:59.398087   15735 round_trippers.go:580]     Cache-Control: no-cache, private
I0510 13:19:59.398092   15735 round_trippers.go:580]     Date: Tue, 10 May 2022 16:19:59 GMT
I0510 13:19:59.398096   15735 round_trippers.go:580]     X-Kubernetes-Pf-Flowschema-Uid: 125dc083-9d02-402f-9380-b741795a2570
I0510 13:19:59.398101   15735 round_trippers.go:580]     X-Kubernetes-Pf-Prioritylevel-Uid: ea917245-a9bd-4f7a-bb79-7a5e91cbe4d1
I0510 13:19:59.398106   15735 round_trippers.go:580]     Audit-Id: b62d9627-186a-4be1-a283-a160343b8aa1
I0510 13:19:59.398110   15735 round_trippers.go:580]     Content-Type: application/json
I0510 13:19:59.398115   15735 round_trippers.go:580]     Expires: 0
I0510 13:19:59.398119   15735 round_trippers.go:580]     Expires: 0
I0510 13:19:59.398126   15735 round_trippers.go:580]     Pragma: no-cache
I0510 13:19:59.398131   15735 round_trippers.go:580]     Pragma: no-cache
I0510 13:19:59.400100   15735 request.go:1181] Response Body: {"kind":"PodList","apiVersion":"v1","metadata":{"resourceVersion":"36909787"},"items":[{"metadata":{"name":"teleport-kube-agent-gus-0","generateName":"teleport-kube-agent-gus-","namespace":"teleport-kube-agent-gus","uid":"fb03d9b7-ad22-4b3c-9766-baa290137356","resourceVersion":"36690396","creationTimestamp":"2022-05-09T16:35:47Z","labels":{"app":"teleport-kube-agent-gus","controller-revision-hash":"teleport-kube-agent-gus-7586c894c6","statefulset.kubernetes.io/pod-name":"teleport-kube-agent-gus-0"},"annotations":{"checksum/config":"f7c4d474d8c6e2c5c447d7bba2bd81b6fb22427f3bbd5d42e0dc439aa0a94a0c","eks.amazonaws.com/role-arn":"arn:aws:iam::165258854585:role/PurpleAgentAssumeRolePod","kubernetes.io/psp":"eks.privileged"},"ownerReferences":[{"apiVersion":"apps/v1","kind":"StatefulSet","name":"teleport-kube-agent-gus","uid":"cbd0cf9d-59eb-45c3-9191-3862eb34c6d3","controller":true,"blockOwnerDeletion":true}],"managedFields":[{"manager":"kube-controller-manager","operation":"Update","apiVersion":"v1","time":"2022-05-09T16:35:47Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:checksum/config":{},"f:eks.amazonaws.com/role-arn":{}},"f:generateName":{},"f:labels":{".":{},"f:app":{},"f:controller-revision-hash":{},"f:statefulset.kubernetes.io/pod-name":{}},"f:ownerReferences":{".":{},"k:{\"uid\":\"cbd0cf9d-59eb-45c3-9191-3862eb34c6d3\"}":{".":{},"f:apiVersion":{},"f:blockOwnerDeletion":{},"f:controller":{},"f:kind":{},"f:name":{},"f:uid":{}}}},"f:spec":{"f:containers":{"k:{\"name\":\"teleport\"}":{".":{},"f:args":{},"f:image":{},"f:imagePullPolicy":{},"f:livenessProbe":{".":{},"f:failureThreshold":{},"f:httpGet":{".":{},"f:path":{},"f:port":{},"f:scheme":{}},"f:initialDelaySeconds":{},"f:periodSeconds":{},"f:successThreshold":{},"f:timeoutSeconds":{}},"f:name":{},"f:ports":{".":{},"k:{\"containerPort\":3000,\"protocol\":\"TCP\"}":{".":{},"f:containerPort":{},"f:name":{},"f:protocol":{}}},"f:readinessProbe":{".":{},"f:failureThreshold":{},"f:httpGet":{".":{},"f:path":{},"f:port":{},"f:scheme":{}},"f:initialDelaySeconds":{},"f:periodSeconds":{},"f:successThreshold":{},"f:timeoutSeconds":{}},"f:resources":{},"f:securityContext":{".":{},"f:allowPrivilegeEscalation":{},"f:capabilities":{".":{},"f:drop":{}},"f:readOnlyRootFilesystem":{},"f:runAsNonRoot":{},"f:runAsUser":{}},"f:terminationMessagePath":{},"f:terminationMessagePolicy":{},"f:volumeMounts":{".":{},"k:{\"mountPath\":\"/etc/teleport\"}":{".":{},"f:mountPath":{},"f:name":{},"f:readOnly":{}},"k:{\"mountPath\":\"/etc/teleport-secrets\"}":{".":{},"f:mountPath":{},"f:name":{},"f:readOnly":{}},"k:{\"mountPath\":\"/var/lib/teleport\"}":{".":{},"f:mountPath":{},"f:name":{}}}}},"f:dnsPolicy":{},"f:enableServiceLinks":{},"f:hostname":{},"f:restartPolicy":{},"f:schedulerName":{},"f:securityContext":{".":{},"f:fsGroup":{}},"f:serviceAccount":{},"f:serviceAccountName":{},"f:subdomain":{},"f:terminationGracePeriodSeconds":{},"f:volumes":{".":{},"k:{\"name\":\"auth-token\"}":{".":{},"f:name":{},"f:secret":{".":{},"f:defaultMode":{},"f:secretName":{}}},"k:{\"name\":\"config\"}":{".":{},"f:configMap":{".":{},"f:defaultMode":{},"f:name":{}},"f:name":{}},"k:{\"name\":\"teleport-kube-agent-gus-teleport-data\"}":{".":{},"f:name":{},"f:persistentVolumeClaim":{".":{},"f:claimName":{}}}}}}},{"manager":"kubelet","operation":"Update","apiVersion":"v1","time":"2022-05-09T16:36:07Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:conditions":{"k:{\"type\":\"ContainersReady\"}":{".":{},"f:lastProbeTime":{},"f:lastTransitionTime":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Initialized\"}":{".":{},"f:lastProbeTime":{},"f:lastTransitionTime":{},"f:status":{},"f:type":{}},"k:{\"type\":\"Ready\"}":{".":{},"f:lastProbeTime":{},"f:lastTransitionTime":{},"f:status":{},"f:type":{}}},"f:containerStatuses":{},"f:hostIP":{},"f:phase":{},"f:podIP":{},"f:podIPs":{".":{},"k:{\"ip\":\"172.31.73.78\"}":{".":{},"f:ip":{}}},"f:startTime":{}}}}]},"spec":{"volumes":[{"name":"teleport-kube-agent-gus-teleport-data","persistentVolumeClaim":{"claimName":"teleport-kube-agent-gus-teleport-data-teleport-kube-agent-gus-0"}},{"name":"config","configMap":{"name":"teleport-kube-agent-gus","defaultMode":420}},{"name":"auth-token","secret":{"secretName":"teleport-kube-agent-join-token","defaultMode":420}},{"name":"kube-api-access-d89fg","projected":{"sources":[{"serviceAccountToken":{"expirationSeconds":3607,"path":"token"}},{"configMap":{"name":"kube-root-ca.crt","items":[{"key":"ca.crt","path":"ca.crt"}]}},{"downwardAPI":{"items":[{"path":"namespace","fieldRef":{"apiVersion":"v1","fieldPath":"metadata.namespace"}}]}}],"defaultMode":420}}],"containers":[{"name":"teleport","image":"quay.io/gravitational/teleport:9.2.1","args":["--diag-addr=0.0.0.0:3000"],"ports":[{"name":"diag","containerPort":3000,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"name":"config","readOnly":true,"mountPath":"/etc/teleport"},{"name":"auth-token","readOnly":true,"mountPath":"/etc/teleport-secrets"},{"name":"teleport-kube-agent-gus-teleport-data","mountPath":"/var/lib/teleport"},{"name":"kube-api-access-d89fg","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"livenessProbe":{"httpGet":{"path":"/readyz","port":"diag","scheme":"HTTP"},"initialDelaySeconds":5,"timeoutSeconds":1,"periodSeconds":5,"successThreshold":1,"failureThreshold":6},"readinessProbe":{"httpGet":{"path":"/readyz","port":"diag","scheme":"HTTP"},"initialDelaySeconds":5,"timeoutSeconds":1,"periodSeconds":5,"successThreshold":1,"failureThreshold":12},"terminationMessagePath":"/dev/termination-log","terminationMessagePolicy":"File","imagePullPolicy":"IfNotPresent","securityContext":{"capabilities":{"drop":["all"]},"runAsUser":9807,"runAsNonRoot":true,"readOnlyRootFilesystem":true,"allowPrivilegeEscalation":false}}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"teleport-kube-agent-gus","serviceAccount":"teleport-kube-agent-gus","nodeName":"ip-172-31-81-15.us-east-2.compute.internal","securityContext":{"fsGroup":9807},"hostname":"teleport-kube-agent-gus-0","subdomain":"teleport-kube-agent-gus","schedulerName":"default-scheduler","tolerations":[{"key":"node.kubernetes.io/not-ready","operator":"Exists","effect":"NoExecute","tolerationSeconds":300},{"key":"node.kubernetes.io/unreachable","operator":"Exists","effect":"NoExecute","tolerationSeconds":300}],"priority":0,"enableServiceLinks":true,"preemptionPolicy":"PreemptLowerPriority"},"status":{"phase":"Running","conditions":[{"type":"Initialized","status":"True","lastProbeTime":null,"lastTransitionTime":"2022-05-09T16:35:47Z"},{"type":"Ready","status":"True","lastProbeTime":null,"lastTransitionTime":"2022-05-09T16:36:07Z"},{"type":"ContainersReady","status":"True","lastProbeTime":null,"lastTransitionTime":"2022-05-09T16:36:07Z"},{"type":"PodScheduled","status":"True","lastProbeTime":null,"lastTransitionTime":"2022-05-09T16:35:47Z"}],"hostIP":"172.31.81.15","podIP":"172.31.73.78","podIPs":[{"ip":"172.31.73.78"}],"startTime":"2022-05-09T16:35:47Z","containerStatuses":[{"name":"teleport","state":{"running":{"startedAt":"2022-05-09T16:35:59Z"}},"lastState":{},"ready":true,"restartCount":0,"image":"quay.io/gravitational/teleport:9.2.1","imageID":"docker-pullable://quay.io/gravitational/teleport@sha256:f00c0c236ba0f6c42124ee54caf3ef1df1ba2aa4567235322037308a6ac5aa1a","containerID":"docker://d458631972b6ed35a5b5682a612a50b60ece124d94e2f648985af2a6341279d9","started":true}],"qosClass":"BestEffort"}}]}
I0510 13:19:59.402072   15735 podcmd.go:88] Defaulting container name to teleport
I0510 13:19:59.402243   15735 round_trippers.go:466] curl -v -XPOST  -H "X-Stream-Protocol-Version: v4.channel.k8s.io" -H "X-Stream-Protocol-Version: v3.channel.k8s.io" -H "X-Stream-Protocol-Version: v2.channel.k8s.io" -H "X-Stream-Protocol-Version: channel.k8s.io" -H "User-Agent: kubectl/v1.23.5 (darwin/amd64) kubernetes/c285e78" 'https://gus.teleportdemo.com:3026/api/v1/namespaces/teleport-kube-agent-gus/pods/teleport-kube-agent-gus-0/exec?command=hostname&container=teleport&stderr=true&stdout=true'
I0510 13:19:59.536018   15735 round_trippers.go:570] HTTP Statistics: DNSLookup 0 ms Dial 0 ms TLSHandshake 0 ms Duration 133 ms
I0510 13:19:59.536041   15735 round_trippers.go:577] Response Headers:
I0510 13:19:59.536050   15735 round_trippers.go:580]     Pragma: no-cache
I0510 13:19:59.536058   15735 round_trippers.go:580]     Upgrade: SPDY/3.1
I0510 13:19:59.536075   15735 round_trippers.go:580]     X-Stream-Protocol-Version: v4.channel.k8s.io
I0510 13:19:59.536084   15735 round_trippers.go:580]     Date: Tue, 10 May 2022 16:19:59 GMT
I0510 13:19:59.536091   15735 round_trippers.go:580]     Cache-Control: no-cache, no-store, must-revalidate
I0510 13:19:59.536098   15735 round_trippers.go:580]     Connection: Upgrade
I0510 13:19:59.536105   15735 round_trippers.go:580]     Expires: 0

kubectl exec pod -i -- hostname does work.
kubectl exec pod -it -- hostname does work.

Bug details:

  • Teleport version: 9.2.1
  • Recreation steps
  • Debug logs
@xacrimon
Copy link
Contributor

Hi, I believe this is the same bug fixed in #12541 that will land soon. Please reopen this issue after if you find that the next v9 release does not fix this for you.

@xacrimon xacrimon self-assigned this May 10, 2022
@r0mant
Copy link
Collaborator

r0mant commented Jun 2, 2022

@xacrimon Can this be closed?

@xacrimon
Copy link
Contributor

xacrimon commented Jun 2, 2022

Yep

@xacrimon xacrimon closed this as completed Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants