Posts

Showing posts with the label kubernetes

Python shell log command not showing up in docker/kubernetes pod

Python shell log command not showing up in docker/kubernetes pod I ran the following code in the python shell but it is not showing up the docker/kubernetes pod logs: import logging logging.basicConfig(level=logging.INFO) logging.info("Test") This is a simplified version of what I am trying to do which is essentially run one-off scripts/commands in the python shell and have logs to show up. How do I go about getting this to work? Is it because the shell I opened up is not attached to the process that creates the logs? I'm currently using Docker and Kubernetes. Thanks! You ran this in a shell? If so then it wont be in the logs. The PID 1 stdout only is sent to logs – Tarun Lalwani Jul 1 at 9:29 What @TarunLalwani said is 100% true, but you can also cheat and tee the output into /proc/1/fd/1 to have...

Image tag in Replication Controller file

Image tag in Replication Controller file I have an image pushed to Google Container Registry, named gcr.io/$(PROJECT_ID)/img-name:46d49ab . gcr.io/$(PROJECT_ID)/img-name:46d49ab In my replication controller I have: apiVersion: v1 kind: ReplicationController metadata: name: go-server-rc spec: replicas: 3 selector: name: go-server version: v8 template: metadata: labels: name: go-server version: v8 spec: containers: - name: go-server image: gcr.io/$(PROJECT_ID)/img-name:46d49ab ports: - containerPort: 5000 This works, but it doesn't when I remove the commit hash tag 46d49ab . I don't want to have to change the tag every single time I commit. 46d49ab I have also set up a trigger on Google Container Builder to pull the master branch of my repository after every commit, and create an image gcr.io/$(PROJECT_ID)/img-name:$(COMMIT_HASH) . gcr.io/$(PROJECT_ID)/img-name:$(COMMIT_HASH) How can I edit my repli...

Are there any third party tools for Kubernetes UI?

Are there any third party tools for Kubernetes UI? Are there any third party tools for Kubernetes UI? Such as to view pods on the main page or to edit the config of an object? 4 Answers 4 There is the dashboard (https://github.com/kubernetes/dashboard) or the now deprecated kube-ui (https://github.com/kubernetes/kube-ui). Also I've played with Weave Scope which has a pretty cool integration with k8s: https://www.weave.works/products/weave-scope/ Thanks @Steve . – Maddy25 Jun 1 '16 at 13:31 We are using https://github.com/ElasticBox/elastickube to manage users and permissions to deploy services and pods. Thanks Naveen ! – Maddy25 Jun 2 '16 at 6:02 ...