What you are doing is fine. Just do kubectl edit deployment  custom-django-app
and add tty: true to the podspec. I bet it will start working.

On Thu, Aug 10, 2017 at 11:10 AM David Rosenstrauch <dar...@darose.net>
wrote:

> The Dockerfile is pretty straightforward:
>
> FROM ubuntu:16.04
> RUN apt-get update && apt-get install -y --no-install-recommends
> python3-django sqlite3 && rm -rf /var/lib/apt/lists/*
> WORKDIR django-apps
> ADD challenge1.tar.gz .
> WORKDIR challenge1
> EXPOSE 8080
> ENTRYPOINT python3 -u manage.py runserver 0.0.0.0:8080
>
> And then I launch it on k8s like so:
>
> kubectl run custom-django-app
> --image="<private-registry>:5000/custom-django-app"
> kubectl expose deployments custom-django-app --port 8080 --type NodePort
>
> Any idea where I'm going wrong?
>
> Thanks,
>
> DR
>
> On 2017-08-10 1:15 pm, Brandon Philips wrote:
> > Hello David-
> >
> > Can you share the code to your app? Something about the app requires a
> > TTY to print out logs.
> >
> > Alternatively, add `tty: True` to the PodSpec
> > https://kubernetes.io/docs/api-reference/v1.7/#podspec-v1-core
> >
> > Brandon
> >
> > On Wed, Aug 9, 2017 at 9:30 AM David Rosenstrauch <dar...@darose.net>
> > wrote:
> >
> >> I'm running a python process (django server) in a pod, which writes
> >> its
> >> output to stdout, but attempting to view the logs with "kubctl logs"
> >> shows nothing.
> >>
> >> I'm similarly unable to view the logs when I run it as a standalone
> >> docker process (i.e., using "docker logs") - unless I run the docker
> >> container using "-dt", at which point I can see the logs just fine
> >> using
> >> "docker logs".
> >>
> >> The problems, here though, are:
> >>
> >> 1) kubectl doesn't have a flag combo of -dt that I can use to launch
> >> the
> >> container.
> >> 2) If I try to use kubectl to launch using just "-t", it forces me
> >> to
> >> use "-i" as well - which then puts me into interactive mode, which
> >> is
> >> not what I want.
> >> 3) It seems like I'm doing something wrong here - i.e., I shouldn't
> >> need
> >> to be jumping through all these hoops altogether to be getting log
> >> output.
> >>
> >> Can anyone please advise what's the correct way to handle this?
> >>
> >> Thanks,
> >>
> >> DR
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Kubernetes user discussion and Q&A" group.
> >> To unsubscribe from this group and stop receiving emails from it,
> >> send an email to kubernetes-users+unsubscr...@googlegroups.com.
> >> To post to this group, send email to
> >> kubernetes-users@googlegroups.com.
> >> Visit this group at
> >> https://groups.google.com/group/kubernetes-users.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Kubernetes user discussion and Q&A" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to kubernetes-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to
> > kubernetes-users@googlegroups.com.
> > Visit this group at https://groups.google.com/group/kubernetes-users.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to