Downsides of services
Course: Kubernetes Part 2 - chapter 6
Services are great, but they have some downsides -
Scaling to multiple apps
Section titled “Scaling to multiple apps”- If you have three apps (frontend, backend, websocket server), you will have to create
3saparate services to route traffic to them. There is no way to docentralized traffic management(routing traffic from the same URL/Path-Based Routing) - There are also limits to how many load balancers you can create

Multiple certificates for every route
Section titled “Multiple certificates for every route”You can create certificates for your load balancers but you have to maintain them outside the cluster and create them manually
You also have to update them if they ever expire

No centralized logic to handle rate limitting to all services
Section titled “No centralized logic to handle rate limitting to all services”Each load balancer can have its own set of rate limits, but you cant create a single rate limitter for all your services.

Trying it out
Section titled “Trying it out”Here is a sample manifest that you can run to start two saparate deployments and attach them to two saparate LoadBalancer services
Manifest
apiVersion: apps/v1kind: Deploymentmetadata: name: nginx-deploymentspec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:alpine ports: - containerPort: 80---apiVersion: apps/v1kind: Deploymentmetadata: name: apache-deploymentspec: replicas: 2 selector: matchLabels: app: apache template: metadata: labels: app: apache spec: containers: - name: my-apache-site image: httpd:2.4 ports: - containerPort: 80---apiVersion: v1kind: Servicemetadata: name: nginx-servicespec: selector: app: nginx ports: - protocol: TCP port: 80 targetPort: 80 type: LoadBalancer---apiVersion: v1kind: Servicemetadata: name: apache-servicespec: selector: app: apache ports: - protocol: TCP port: 80 targetPort: 80 type: LoadBalancerkubectl apply -f manifest.ymlYou will notice two load balancers created for your two services

Open the load balancers

