kubernetes-pod

RunAsUser issue & Clicking external IP of load balancer -> Bad Request (400) on deploying Django app on GKE (Kubernetes) and db connection failing:

感情迁移 提交于 2019-12-24 21:14:21
问题 Probem: I have 2 replicas for my app, library. I have configured a service to talk to my two replicas. I have a dockerfile that starts my app at port # 8080. The load balancer and the app containers all seem to be running. However, I am not able to connect to them. Every time I click on the external IP shown I get "Bad Request (400)" This log from the container seems to indicate somethingw ith the db connection going wrong... 2019-12-07 07:33:56.669 IST Traceback (most recent call last): File

Can't ping postgres pod from another pod in kubernetes

家住魔仙堡 提交于 2019-12-24 20:09:26
问题 I created one busy pod to test db connection by following yaml pod.yaml kind: Pod apiVersion: v1 metadata: name: marks-dummy-pod spec: containers: - name: marks-dummy-pod image: djtijare/ubuntuping:v1 command: ["/bin/bash", "-ec", "while :; do echo '.'; sleep 5 ; done"] restartPolicy: Never Dockerfile used :- FROM ubuntu RUN apt-get update && apt-get install -y iputils-ping CMD bash I create service as postgresservice.yaml kind: Service apiVersion: v1 metadata: name: postgressvc spec: type:

single service with multiple exposed ports on a pod with multiple containers

微笑、不失礼 提交于 2019-12-23 22:10:15
问题 I have gotten multiple containers to work in the same pod. kubectl apply -f myymlpod.yml kubectl expose pod mypod --name=myname-pod --port 8855 --type=NodePort then I was able to test the "expose" minikube service list .. |-------------|-------------------------|-----------------------------| | NAMESPACE | NAME | URL | |-------------|-------------------------|-----------------------------| | default | kubernetes | No node port | | default | myname-pod | http://192.168.99.100:30036 | | kube

kubernetes error : skipping pod synchronization

做~自己de王妃 提交于 2019-12-23 21:59:51
问题 i have configured kubernetes master on centos 7 and kubernetes node on another node centos 7 services running on kube master: kube-controller-manager kube-apiserver kube-scheduler etcd flanneld service running on kube node: flanneld docker kube-proxy kubelet all services are up and running and i could see the api url successfully getting all endpoints. http://kube-master:8080 however, when i am running command kube get nodes , getting following error : skipping pod synchronization. container

Kubernetes / Rancher 2, mongo-replicaset with Local Storage Volume deployment

血红的双手。 提交于 2019-12-20 01:45:07
问题 I try, I try, but Rancher 2.1 fails to deploy the " mongo-replicaset " Catalog App, with Local Persistent Volumes configured. How to correctly deploy a mongo-replicaset with Local Storage Volume? Any debugging techniques appreciated since I am new to rancher 2. I follow the 4 ABCD steps bellow, but the first pod deployment never ends. What's wrong in it? Logs and result screens are at the end. Detailed configuration can be found here. Note : Deployment without Local Persistent Volumes succeed

Executing multiple commands( or from a shell script) in a kubernetes pod

久未见 提交于 2019-12-18 07:46:58
问题 I'm writing a shell script which needs to login into the pod and execute a series of commands in a kubernetes pod. below is my sample_script.sh kubectl exec octavia-api-worker-pod-test -c octavia-api bash unset http_proxy https_proxy mv /usr/local/etc/octavia/octavia.conf /usr/local/etc/octavia/octavia.conf-orig /usr/local/bin/octavia-db-manage --config-file /usr/local/etc/octavia/octavia.conf upgrade head After running this script, I'm not getting any output. Any help will be greatly

Kubernetes Docker Containers behind proxy

六月ゝ 毕业季﹏ 提交于 2019-12-13 03:47:55
问题 we do have deployed a Kubernetes Cluster behind a proxy and successfully configured docker daemon to use our proxy for puling images as described at the following page: https://docs.docker.com/config/daemon/systemd/#httphttps-proxy We do have configured the Docker client to set the environemnt paramaters "https_proxy", "http_proxy" and "no_proxy" as defined at the following page: https://docs.docker.com/network/proxy/#configure-the-docker-client The Kubernetes cluster setup is as follows:

OpenShift - nginx pod as SSL termination and load balancer

别等时光非礼了梦想. 提交于 2019-12-13 00:06:16
问题 In the past, I have used the following configuration file for nginx on Ubuntu. It does the following: SSL termination Load balancer Inserts a custom header X-Nginx-header Logs the invocations events { } http { log_format main '$time_iso8601 - $remote_addr - "$http_user_agent" - "$request" - $request_id ' '- $status - $body_bytes_sent - $request_time '; access_log /home/ubuntu/project-demo/logs/access.log main; error_log /home/ubuntu/project-demo/logs/error.log error; proxy_cache_path /data

Cannot create a deployment that requests more than 2Gi memory

巧了我就是萌 提交于 2019-12-12 11:16:51
问题 My deployment pod was evicted due to memory consumption: Type Reason Age From Message ---- ------ ---- ---- ------- Warning Evicted 1h kubelet, gke-XXX-default-pool-XXX The node was low on resource: memory. Container my-container was using 1700040Ki, which exceeds its request of 0. Normal Killing 1h kubelet, gke-XXX-default-pool-XXX Killing container with id docker://my-container:Need to kill Pod I tried to grant it more memory by adding the following to my deployment yaml : apiVersion: apps

How to trigger a container to start another container and terminate it when a REST query is passed to it?

大兔子大兔子 提交于 2019-12-11 04:15:23
问题 i have two separate containers having docker images where one is running the REST application and the other one is running the process for downloading satellite images. My aim is that when i click on the download button after passing the query with defined parameters in my main application, it should start the container for download and once downloaded, it should stop the container .Currently i am able to run the container for download independently by providing all the necessary environment