kontena / pharos-cluster

Pharos - The Kubernetes Distribution
https://k8spharos.dev/
Apache License 2.0
311 stars 43 forks source link

pharos-cluster kubeconfig outputs logging headers when running in an interactive Docker container #560

Open SpComb opened 6 years ago

SpComb commented 6 years ago

Assuming this happens because docker-compose run uses docker run -it, meaning that the container process has a pty for stdout even though the docker CLI stdout is redirected to a file.

$ docker-compose run --rm pharos-cluster kubeconfig > .kube/config
$ head .kube/config 
==> Reading instructions ...
---
apiVersion: v1
clusters:
....
SpComb commented 6 years ago

I'm guessing that this should work with docker-compose run -T to disable the tty allocation, for but whatever reason that also causes pharos-cluster kubeconfig to just hang without any output... confirmed with docker-compose --verbose that it's still attaching the container with AttachStdout: True :confused: