- vừa được xem lúc

Service Mesh on Kubernetes - Chapter 1 - Installing Istio in Kubernetes (English)

0 0 11

Người đăng: Quân Huỳnh

Theo Viblo Asia

Bài viết tiếng Việt - Bài 1 - Cài đặt Istio vào Kubernetes

In the previous article, we learned about the concept of Service Mesh and What is Isito. From this article we will go into practice, in the first lesson we will learn how to install Istio into Kubernetes.

I refer to this series from the book Istio In Action, you can read it first without having to wait for my series.

How to install Istio?

To install Istio into Kubernetes we can use one of three ways:

  • Using the istioctl
  • Using istio-operator
  • Use Helm to install Istio Helm Chart

In this article we will use istioctl.

Install istioctl

Visit release page https://github.com/istio/istio/releases and check latest version.

Run this handy script to download:

curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.15.1 sh -
mv istio-1.15.1/bin/istioctl /user/local/bin

Run the istioctl to verify that everything works:

istioctl version

let’s verify that any prerequisites have been met in our Kubernetes cluster before we begin installation.

istioctl x precheck
✔ No issues found when checking the cluster. Istio is safe to install or upgrade! To get started, check out https://istio.io/latest/docs/setup/getting-started/

Installing the Istio components into Kubernetes

We can use istioctl, istio-operator, or Helm to install Istio. In this tutorial, we use istioctl.

To perform the demo install, use the istioctl CLI tool as shown next:

istioctl install --set profile=demo -y
✔ Istio core installed
✔ Istiod installed
✔ Egress gateways installed
✔ Ingress gateways installed
✔ Installation complete

After done, we can run the kubectl to list all of the Pods in the istio-system namespace.

kubectl get pod -n istio-system
NAME READY STATUS RESTARTS AGE
istio-egressgateway-65b6c9d675-4gf7d 1/1 Running 0 2m45s
istio-ingressgateway-6984cfd6ff-b7tql 1/1 Running 0 2m45s
istiod-74bd9b9864-t7sn9 1/1 Running 0 3m11s

You notice the Istio control plane there is only a single replica or instance. “This appears to be a single point of failure. What happens if these components fail or go down?”

The Istio control plane is intended to be deployed in a highly available architecture.

We can run the verify-install command post install to verify that it has completed successfully:

istioctl verify-install

Istio control-plane has some addons, for example, Grafana and Jaeger. For demo purposes only.

Install Prometheus

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.15/samples/addons/prometheus.yaml

Install Grafana

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.15/samples/addons/grafana.yaml

Install Jaeger

kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.15/samples/addons/jaeger.yaml

After the installation is complete, the architecture of Istio will be as shown below.

Now we can write a configuration file to create Istio resources, for example VirtualService in Istio:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata: name: reviews-route
spec: hosts: - reviews.prod.svc.cluster.local http: - headers: request: set: test: "true" route: - destination: host: reviews.prod.svc.cluster.local subset: v2 weight: 25 - destination: host: reviews.prod.svc.cluster.local subset: v1 headers: response: remove: - foo weight: 75

Conclusion

So we have installed Istio into Kuberntes and its components successfully, in the next lesson we will start to learn and make the first example of how to use Istio.

Các công việc DevOps hấp dẫn đang chờ bạn tại DevOps VN.

Học DevOps tại các trung tâm uy tính.

Tham gia kênh Slack của DevOps VN.

Bình luận

Bài viết tương tự

- vừa được xem lúc

Đề thi interview DevOps ở Châu Âu

Well. Chào mọi người, mình là Rice - một DevOps Engineers ở đâu đó tại Châu Âu.

0 0 65

- vừa được xem lúc

In calculus, love also means zero.

Mình nhớ hồi năm 2 đại học, thầy giáo môn calculus, trong một giây phút ngẫu hứng, đã đưa ra cái definition này. Lúc đấy mình cũng không nghĩ gì nhiều.

0 0 51

- vừa được xem lúc

Chuyện thay đổi

Thay đổi là một thứ gì đó luôn luôn đáng sợ. Cách đây vài tháng mình có duyên đi làm cho một banking solution tên là X.

0 0 30

- vừa được xem lúc

Pet vs Cattle - Thú cưng và gia súc

Khái niệm. Pets vs Cattle là một khái niệm cơ bản của DevOps. Bài viết này sẽ nói về sự phát triển của các mô hình dịch vụ từ cốt lõi Pets and Cattle. 1.

0 0 22

- vừa được xem lúc

Git workflow được Google và Facebook sử dụng có gì hay ho

Với developer thì Git hẳn là công cụ rất quen thuộc và không thể thiếu rồi. Thế nhưng có mấy ai thực sự hiểu được Git.

0 0 65

- vừa được xem lúc

Kubernetes - Học cách sử dụng Kubernetes Namespace cơ bản

Namespace trong Kubernetes là gì. Tại sao nên sử dụng namespace.

0 0 96