Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

0 Días
11 Hrs
55 Min
50 Seg

Introducción a Istio Ingress

14/20
Resources
Transcript

What are the Kubernetes service types?

Kubernetes is a powerful tool for managing containers in the cloud, and understanding the types of services it provides is critical to optimizing communication within clusters. Below, we explore the main types of services Kubernetes provides, and when it's best to use them.

What is IP Clustering?

Cluster IP is one of the base services in Kubernetes. When using Cluster IP, an internal IP address is assigned to a service, allowing it to be accessible only within the Kubernetes cluster. It is especially useful for services that do not need to communicate with the outside, such as in applications like Online Boutique, where only the frontend exposes its service to the outside. Internal services communicate with each other, such as inventory, currency and checkout, using Cluster IP.

How does NodePort work?

When you need services to be accessible from outside the cluster, but do not want to create a Load Balancer, the NodePort option maps a port on each node in the cluster to a specific service. Requests arriving at any node can be redirected to a specific pod via IP Tables rules configured by QProxy. Although it may be less efficient than other solutions, it is suitable for internal environments such as a Virtual Private Cloud (VPC).

Why use Load Balancer?

To expose a service directly to the internet, the Load Balancer service type is the simplest solution. In Google Kubernetes Engine (GKE), this generates a Google Cloud load balancer with a unique IP, allowing you to direct traffic from the internet to your services. However, it is important to be cost conscious, as each service exposed with a Load Balancer will incur charges for the IP and balancing service.

What is Ingress and how is it used?

Ingress itself is not a type of service, but a resource that provides intelligent rules to manage traffic. It behaves like a router, allowing a single entry to the cluster and is able to handle routes based on headers, hostnames or URLs.

How to configure an Ingress Gateway?

Configuring an Ingress Gateway in GKE is a simple process. First, the gateway name is defined in the metadata, which will be crucial for later steps. A selector is used to bind a specific port. The Ingress Gateway also offers advanced features such as SSL and authorization rules. Usually you will need to set up a wildcard for demonstration or test environments and specify virtual services for routing traffic.

apiVersion: networking.istio.io/v1alpha3kind: Gatewaymetadata: name:  frontend-gatewayspec: selector: istio: ingressgateway servers: - port: number: 80 name: http protocol: HTTP hosts: - "*"---apiVersion: networking.istio.io/v1alpha3kind: VirtualServicemetadata: name:  frontend-ingressspec: hosts: - "*" gateways: -  frontend-gateway http: - match: - port: 80 route: - destination: host: frontend

What are Destination Rules?

Destination Rules allow you to define policies on how traffic to a service should be handled. This is useful for canary deployments, distributing traffic between different versions of a service. Destination Rules make it easy to specify rules on how and how much traffic should go to each version.

How are services monitored in Kubernetes?

Observability is key to managing services in Kubernetes. Tools like Anthor Service Mesh provide consoles where they can be examined:

  • Golden Signals: such as request rate, errors, latencies and resources used (CPU, memory, disk).
  • Topology graphs: to visualize where services are deployed and how they interconnect.
  • Metrics: detailed, showing requests per second, errors and latencies.

By looking at these metrics, developers can make critical scalability adjustments and ensure that the system operates efficiently even in the face of peak demand.

It is fascinating to see how these tools enable fine-grained control and facilitate large-scale management, providing greater security and operational efficiency. The invitation is to continue exploring and experimenting to take full advantage of the infrastructure that Kubernetes and its related tools offer.

Contributions 4

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?

TIPOS DE SERVICIOS:

Cluster IP
-Asigna una IP interna al cluster para el servicio
-El servicio no es expuesto a recursos fuera del cluster

NodePort
-Genera un mapeo de cada nodo del cluster a un servicio
-Las peticiones que llegan a un nodo alcanzan los pods en el cluster por reglas de iptables (config. por kube-proxy)
-Las peticiones pueden ser enrutadas a cualquier pod
-Utilizado para exponer servicios dentro de una VPC

Load Balancer
-La manera estándar de exponer tu servicio al internet
-En GKE, genera un balanceador de carga que te da una IP única (dirigir trafico al servicio)
-Cada vez que expones un servicio, se generará una IP por servicio (se vuelve caro)

Ingress
-Actua como router inteligente que sirve como la entrada al cluster
-En GKE, el controlador de Ingress genera un balanceador de carga HTTP(S)
-Es la manera más útil de exponer múltiples servicios usando una IP única
-Más funcionalidades de caja (SSL, Routing, Auth,etc)

Istio Ingress es una característica de Istio que permite exponer servicios de una malla de servicios a Internet o a otros clústeres de Kubernetes. Istio Ingress proporciona un control centralizado sobre el tráfico entrante y saliente de los servicios, lo que facilita la implementación de funciones como el balanceo de carga, la seguridad y la supervisión. Istio Ingress funciona mediante la creación de un gateway, que es un servidor proxy que recibe y dirige el tráfico entrante y saliente de los servicios de la malla. El gateway se configura mediante un recurso `Gateway` de Istio, que especifica el protocolo, el puerto y el host que se utilizarán para exponer el servicio. Istio Ingress admite una variedad de protocolos y configuraciones de seguridad, lo que lo hace adecuado para una amplia gama de aplicaciones. Por ejemplo, Istio Ingress se puede utilizar para exponer un servicio HTTP a Internet, o para exponer un servicio TCP a otro clúster de Kubernetes. Aquí hay algunos de los beneficios de usar Istio Ingress: * **Facilidad de uso:** Istio Ingress proporciona un control centralizado sobre el tráfico entrante y saliente de los servicios, lo que facilita la implementación de funciones como el balanceo de carga, la seguridad y la supervisión. * **Escalabilidad:** Istio Ingress se puede escalar para manejar grandes volúmenes de tráfico. * **Seguridad:** Istio Ingress admite una variedad de protocolos y configuraciones de seguridad, lo que lo hace adecuado para aplicaciones que requieren un alto nivel de seguridad. Aquí hay algunos ejemplos de cómo se puede usar Istio Ingress: * **Para exponer un servicio web a Internet:** Istio Ingress se puede usar para exponer un servicio web a Internet, lo que permite a los usuarios acceder al servicio desde cualquier lugar. * **Para exponer un servicio a otro clúster de Kubernetes:** Istio Ingress se puede usar para exponer un servicio a otro clúster de Kubernetes, lo que permite a los servicios de diferentes clústeres comunicarse entre sí. * **Para implementar un balanceador de carga:** Istio Ingress se puede usar para implementar un balanceador de carga, lo que distribuye el tráfico entrante entre varios pods de un servicio. Para obtener más información sobre Istio Ingress, consulte la documentación de Istio.

Increíble 🤟

Me encantó esta clase, actualmente uso microservicios pero no entendía la parte del yaml y las etiquetas, adicional a ello había hecho un laboratorio en https://www.qwiklabs.com/ para entender los SLO, pero con esta clase lo entendí.