Giter Club home page Giter Club logo

istio-http-example's Introduction

istio-http-example

Prepare

kubernetes

You have to prepare kubernetes cluster. I'm using EKS on AWS.

istioctl

$ curl -L https://git.io/getLatestIstio | sh -
$ cd istio-1.*
$ sudo cp bin/istioctl /usr/local/bin/

helm

$ cd istio-1.*
$ kubectl create -f install/kubernetes/helm/helm-service-account.yaml
$ helm init --service-account tiller

istio

$ kubectl create namespace istio-system
$ cd istio-1.*
$ helm install \
--wait \
--name istio \
--namespace istio-system \
install/kubernetes/helm/istio
...
$ helm status istio
LAST DEPLOYED: Fri Feb  1 22:40:42 2019
NAMESPACE: istio-system
STATUS: DEPLOYED
...

If you can find istio-sidecar-injector, istio auto injection is running.

$ kubectl get pods -n istio-system
NAME                                     READY   STATUS    RESTARTS   AGE
istio-citadel-7dd558dcf-ldb44            1/1     Running   0          17h
istio-egressgateway-88887488d-bp7qv      1/1     Running   0          17h
istio-galley-787758f7b8-txr4p            1/1     Running   0          17h
istio-ingressgateway-58c77897cc-qn554    1/1     Running   0          17h
istio-pilot-868cdfb5f7-znvjr             2/2     Running   0          17h
istio-policy-56c4579578-25ztf            2/2     Running   0          17h
istio-sidecar-injector-d7f98d9cb-gnckv   1/1     Running   0          17h
istio-telemetry-7fb48dc68b-4826f         2/2     Running   0          17h
prometheus-76db5fddd5-48zqq              1/1     Running   0          17h

Run

$ kubectl apply -f namespace.yml
$ kubectl apply -f deployment-backend.yml
$ kubectl apply -f service-backend.yml
$ kubectl apply -f deployment-client.yml

If istio auto injection is running, you can find 2 containers per pod.

$ kubectl get pods -n istio-http-example
NAME                        READY   STATUS    RESTARTS   AGE
backend-0-5b4d8b696-2q5d7   2/2     Running   0          1m
backend-0-5b4d8b696-r8cvn   2/2     Running   0          1m
client-0-796bb44b64-m5rq4   2/2     Running   1          43s

You can confirm http connection.

$ kubectl logs -f client-0-796bb44b64-m5rq4 -n istio-http-example -c client
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.