kubernetes-pod

Session Affinity Settings for multiple Pods exposed by a single service

感情迁移 提交于 2021-02-20 11:50:48
问题 I have a setup Metallb as LB with Nginx Ingress installed on K8S cluster. I have read about session affinity and its significance but so far I do not have a clear picture. How can I create a single service exposing multiple pods of the same application? After creating the single service entry point, how to map the specific client IP to Pod abstracted by the service? Is there any blog explaining this concept in terms of how the mapping between Client IP and POD is done in kubernetes? But I do

k8s:Two images but single container [duplicate]

被刻印的时光 ゝ 提交于 2021-02-11 14:33:03
问题 This question already has an answer here : Pod with multiple images (1 answer) Closed last month . Below are the exact words of a question that came up in an online test. Create an single container app running in a pod named "bla-bla" with any 3 of the four images listed below. Images: nginx + redis+ memcached. I'm not sure whether this is a wordplay or a typo but what I would like to know is whether there is any syntax for launching multiple images in a single container? I know this can be

GKE Cluster autoscaler profile for older luster

社会主义新天地 提交于 2021-02-11 12:41:55
问题 Now in GKE there is new tab while creating new K8s cluster Automation - Set cluster-level criteria for automatic maintenance, autoscaling, and auto-provisioning. Edit the node pool for automation like auto-scaling, auto-upgrades, and repair. it has two options - Balanced (default) & Optimize utilization (beta) cant we set this for older cluster any work around? we are running old GKE version 1.14 we want to auto-scale cluster when 70% of resource utilization of existing nodes. Currently, we

How to programmatically modify a running k8s pod status conditions?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-11 12:01:40
问题 I'm trying to modify the running state of my pod, managed by a deployment controller both from command line via kubectl patch and from the k8s python client API. Neither of them seem to work From the command line, I tried both strategic merge match and JSON merge patch, but neither of them works. For e.g. I'm trying to patch the pod conditions to make the status field to False kubectl -n foo-ns patch pod foo-pod-18112 -p '{ "status": { "conditions": [ { "type": "PodScheduled", "status":

How to route test traffic through kubernetes cluster (minikube)?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-11 04:33:10
问题 I have a minikube cluster with two pods (with ubuntu containers). What I need to do is route test traffic from one port to another through this minikube cluster. This traffic should be sent through these two pods like in the picture. I am a beginner in this Kubernetes stuff so I really don't know how to do this and which way to go... Please, help me or give me some hints. I am working on ubuntu server ver. 18.04. enter image description here 回答1: I agree with an answer provided by @Harsh

How to route traffic from pysical server's port to minikube cluster?

一个人想着一个人 提交于 2021-02-10 18:15:36
问题 I want to sent traffic from one port through kubernetes cluster (using minikube) to another physical port. I don't know how to route traffic from physical port to cluster and from cluster to the second physical port. I'm exposing cluster via ingress (and I tested service solution also), i have one service to send external tarffic to pod and another to sent traffic from first pod to second pod. But I really don't know how to send this traffic from port to cluster and how to sent from cluster

How to route traffic from pysical server's port to minikube cluster?

一世执手 提交于 2021-02-10 18:11:56
问题 I want to sent traffic from one port through kubernetes cluster (using minikube) to another physical port. I don't know how to route traffic from physical port to cluster and from cluster to the second physical port. I'm exposing cluster via ingress (and I tested service solution also), i have one service to send external tarffic to pod and another to sent traffic from first pod to second pod. But I really don't know how to send this traffic from port to cluster and how to sent from cluster

Running A cronjob in a pod in Kubernetes

元气小坏坏 提交于 2021-02-10 07:48:56
问题 I have a backend nodeJS application running in a kubernetes cluster. Now I want to run two cron jobs to be scheduled every month. The cron jobs are in a JS file. How do I create a job that runs those JS files in the pod running that service every month using Kubernetes ? This link gives a basic understanding of how it works but I am a little confused on how to run it for a specific service and on a specific pod https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#writing-a

How to obtain Ip address of a kubernetes pod by querying DNS srv records?

ぃ、小莉子 提交于 2021-02-08 08:46:19
问题 I am trying to create a kubernetes job inside which I will run "dig srv" queries to find out the IP address of all the pods for any specific service running on the same cluster. Is this achievable ? I would like to elaborate a little more on the problem statement. There are a few services already running on the cluster. The requirement is to have a tool that can accept a service name and list down the IP addresses of all the pods belonging to that service. I was able to do this by using

Multiple instance of same pod in same node - Kubernetes

左心房为你撑大大i 提交于 2021-02-07 10:54:33
问题 I want to run multiple instances of same pod in the same node in the Kubernetes. I am using a wildfly docker image for this. When running more than one pod in the same node, I am getting port conflict exception. 2020-11-30 15:53:17,079 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([ ("core-service" => "management"), ("management-interface" => "http-interface") ]) - failure description: {"WFLYCTL0080: Failed