Rancher - Istio

Istio es una malla de servicios de código abierto que se superpone de forma transparente a las aplicaciones distribuidas existentes. Las potentes funciones de Istio proporcionan una forma uniforme y más eficiente de proteger, conectar y supervisar los servicios. Además, Istio provee un servicio de malla para una alta redundancia.

Instalar Istio

En esta guía instalaremos istio mediante Rancher explorer, para ello daremos clic en el botón Explorer en la lista de Clusters de Rancher.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Una vez que estes en el explorador de Rancher, despliega el menú superior izquierdo y selecciona Apps & Marketplace.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Al seleccionar esta opción, Rancher desplegará una lista de las aplicaciones disponibles, dentro de esta lista selecciona Istio.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Una vez que selecciones Istio, Rancher desplegará una ventana de configuración para la instalación, para instalar Istio da clic en el botón Install.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Al dar clic en este botón, Rancher abrirá una consola donde podrás visualizar la instalación, cuando la instalación termine podrás visualizar la opción de Istio en el menú superior izquierdo.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Aplicar Service mesh a un deployment

Una vez que hayas instalado Istio, ahora aplicaremos Mesh a un deployment existente, para ello iremos a la lista principal de Clusters y seleccionaremos nuestro Cluster.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Dentro de nuestro Cluster selecciona Project/Namespaces en el menú superior.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Rancher te mostrará una lista de los Namespaces que actualmente contiene tu Cluster. Identifica el namespace donde se encuentra tu deployment, da clic en el botón con los 3 puntitos y da clic en Edit.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Rancher te mostrará una ventana donde podrás actualizar la información del Namespace. Para poder implementar Mesh, debemos colocar una label en el namespace. Para ello, dirigete a la sección Labels & Annotation y da clic en el botón Add Label.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Una vez que hayas dado clic en este botón, ingresa la llave y el valor de la label, en este caso: istio-injection=enabled una vez que hayas agregado esta Label da clic en el botón Save.

Label

Al editar la información del Namespace verás el logo de Istio justo a un costado del nombre de tu Namespace.

Istio NS

Por último, tendrás que reiniciar los Pods para que la configuración de Mesh se agregué, para ello, ejecuta el siguiente comando:

kubectl -n <NAMESPACE> rollout restart <DEPLOYMENT-NAME>

Tras ejecutar el comando podrás ver un cambio en la lista de Pods pues se aumentará el número de Pods.

Acceder a métricas de Istio

Istio nos proporciona una serie de métricas y gráficas para poder monitorear los servicios de Mesh mediante el Dashboard Kiali. Para acceder da clic, en el botón Explore en la lista de Clusters.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Posteriormente, selecciona la opción de Istio en el menú superior izquierdo.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Al seleccionar Istio, podrás visualizar dos opciones, dentro de ellas Kiali, para acceder da clic en el hipervínculo de Kiali.

Kiali a

Al dar clic en el hipervínculo, Rancher abrirá Kiali dashboard en una nueva ventana, en el podrás observar los namespaces de tus Cluster. Para acceder a una gráfica de un determinado Namespace, da clic en el botón de los 3 puntos y selecciona la opción Graph.

Kiali NS

Posteriormente, da clic en el botón Display idle nodes.

Idle nodes

Al dar clic en este botón, podrás observar la gráfica del Namespace y del lado derecho un resumen de las peticiones a los servicios.

Graph

GRAPH STATUS