Tag: kubernetes

flask application running on Kubernete Pods doesn't respect port in configuration

I have deployed my kubernete container onto google cloud platform, everything works as expected. But one thing confused me is that I specifically set my flask application to run on port 9001 and did set conatinerPort to 9001 as well using –port 9001 with kubectl run command. But somehow, the flask app still runs on […]

CrashLoopBackOff when args are added in Kubernetes

This deployment is fine until I add args (added below) to the deployment. I can’t figure out why it would turn into a CrashLoopError when adding simple args. I even tried to echo Hello World and it still results in a CrashLoopError. There are no logs and when I describe the pod it shows: Warning […]

How do we get something unique like pod id or container id in kubernetes deployment yamls

I’m working on setting up a kubernetes pod for a service.There is a need to use persistent volumes for logs,certs etc which should be available at some sub-path at host like service/log.Now i want to make this folder unique by changing to something like service/log_podID or log_podName.How can i get a pod name or pod […]

LEMP Kubernetes

Let’s say we don’t want to over complicate the example and we’ve decided to use external storage for database. Also, code, config files etc are part of docker images. My question is, based on experience, good practices and ease of use. What’s the strategy you guys are using for deploying nginx, php-fpm stack? Three options […]

Discovering nsqd server address from nslookupd

I’m running an nsq cluster in Docker containers using the following docker-compose.yaml file: version: ‘2’ services: nsqlookupd: image: nsqio/nsq command: /nsqlookupd ports: – “4160” – “4161:4161” nsqd: image: nsqio/nsq command: /nsqd –lookupd-tcp-address=nsqlookupd:4160 –data-path=/data volumes: – data:/data ports: – “4150:4150” – “4151:4151” nsqadmin: image: nsqio/nsq command: /nsqadmin –lookupd-http-address=nsqlookupd:4161 ports: – “4171:4171” volumes: data: Everything runs fine. […]

Switching Between Root and Non-Root Users in Docker

So I’m trying to deploy a Django app on Minikube. But in one of the containers, the image requires me to be in root for certain tasks and then switch the postgres user to create some databases and then switch back to root to run more commands. I know I can use the USER functionality […]

is it possible to make a docker image from a debian image

I am using google compute engine and want to use kubernetes I have created an image for my machine without using dockers. The command I used is sudo gcimagebundle -d /dev/sda -o /tmp/ –log_file=/tmp/ansible.log it results in this image file 6820b8b74dba0d115e3f9e0b969055ac6b67bc65.image.tar.gz Is is possible to create a Dockerfile that creates a docker image from that […]

How to define Kubernetes Job using a private docker registry?

I have a simple Kubernetes job (based on the http://kubernetes.io/docs/user-guide/jobs/work-queue-2/ example) which uses a Docker image that I have placed as a public image on my dockerhub account. It all loks like this: job.yaml: apiVersion: batch/v1 kind: Job metadata: name: job-wq-2 spec: parallelism: 2 template: metadata: name: job-wq-2 spec: containers: – name: c image: jonalv/job-wq-2 […]

How can kubernetes dynamically expose my docker port?

I have a dockerfile of a ruby app that runs a puma server on port 5000. (It EXPOSE the port and also uses the RUN command to run puma -p 5000. In my deployment.yaml I have to set containerPort to be 5000 to match this port. This seems odd to me that my configuration lists […]

Kubernetes Redis HA and exposing redis to things outside of the container

I am trying to learn docker and kubernetes and one of the things I am trying to do is setup Redis with Sentinel and expose redis to things outside the container. Getting redis and sentinel setup was pretty easy following https://github.com/kubernetes/kubernetes/tree/master/examples/storage/redis But now my next desire is to be able to access redis outside the […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.