kubernetes-service

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

unable to access a service from another pod, using xmlhttprequest object

亡梦爱人 提交于 2021-02-11 18:16:13
问题 So, I wrote an API that is listening on the the path /api/v1/books and is deployed as a deployment on my k8s cluster, created service ( restapi-service ) so that we can call that from another pods. Now I created another deployment ( restapi-ui-deployment ) that just has a .html page and and its being deployed on nginx, which eventually calls the the service that we have created earlier to get the response. Now, the issue is when I exec into the pods of restapi-ui-deployment I am successfully

unable to access a service from another pod, using xmlhttprequest object

♀尐吖头ヾ 提交于 2021-02-11 18:16:13
问题 So, I wrote an API that is listening on the the path /api/v1/books and is deployed as a deployment on my k8s cluster, created service ( restapi-service ) so that we can call that from another pods. Now I created another deployment ( restapi-ui-deployment ) that just has a .html page and and its being deployed on nginx, which eventually calls the the service that we have created earlier to get the response. Now, the issue is when I exec into the pods of restapi-ui-deployment I am successfully

unable to access a service from another pod, using xmlhttprequest object

主宰稳场 提交于 2021-02-11 18:14:15
问题 So, I wrote an API that is listening on the the path /api/v1/books and is deployed as a deployment on my k8s cluster, created service ( restapi-service ) so that we can call that from another pods. Now I created another deployment ( restapi-ui-deployment ) that just has a .html page and and its being deployed on nginx, which eventually calls the the service that we have created earlier to get the response. Now, the issue is when I exec into the pods of restapi-ui-deployment I am successfully

Ingress or Service with type: LoadBalancer

北慕城南 提交于 2021-02-10 14:42:39
问题 Kubernetes has both Ingress (in front of a Service) and Service with type: LoadBalancer. These seem to do identical things: allow public traffic into the pods matching the service's selector. What are the benefits and drawbacks of each? In what scenarios would I choose one over the other? 回答1: Assume that AWS, GCP or Azure is where your infrastructure located Ingress: Only work if you have ingress controller such as nginx-ingress-controller, traefik,... Many services could share the same

Ingress or Service with type: LoadBalancer

吃可爱长大的小学妹 提交于 2021-02-10 14:41:09
问题 Kubernetes has both Ingress (in front of a Service) and Service with type: LoadBalancer. These seem to do identical things: allow public traffic into the pods matching the service's selector. What are the benefits and drawbacks of each? In what scenarios would I choose one over the other? 回答1: Assume that AWS, GCP or Azure is where your infrastructure located Ingress: Only work if you have ingress controller such as nginx-ingress-controller, traefik,... Many services could share the same

Could two cluster IP services be connected in Kubernetes?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-10 05:45:27
问题 The situation is that I want to connect two cluster IP services that are inside a tenant which already has Traefik as NodePort so that any of these two services can be a LoadBalancer because the NodePort is used by Traefik. The two services I am trying to connect work as follows. The first one, which I called "Master", will receive a post from the client with a text and will call the other service, called "slave", which will add some text ("Hola Patri") to the text sent by the client. The two

Kubernetes services are not accessible through nodeport with Desktop Docker setup

拜拜、爱过 提交于 2021-02-05 10:56:35
问题 I am using Docker Desktop on windows 10. And I generate kubernetes NodePort Service to access from client web browser (http://10.110.201.24:30008/hello/praveen) but service is not accessible. apiVersion: apps/v1 kind: Deployment metadata: name: my-app spec: selector: matchLabels: run: spring-app replicas: 1 template: metadata: labels: run: spring-app spec: containers: - name: spring-boot image: praveen1233/spring-boot:v1 ports: - containerPort: 80 service apiVersion: v1 kind: Service metadata

Load balancing to multiple containers of same app in a pod

三世轮回 提交于 2021-01-29 10:14:27
问题 I have a scenario where I need to have two instances of an app container run within the same pod. I have them setup to listen on different ports. Below is how the Deployment manifest looks like. The Pod launches just fine with the expected number of containers. I can even connect to both ports on the podIP from other pods. kind: Deployment metadata: labels: service: app1-service name: app1-dep namespace: exp spec: template: spec: contianers: - image: app1:1.20 name: app1 ports: -