티스토리 뷰

[업데이트 2020.06.13 12:08]

 

Prerequisites

  1. Perform any necessary platform-specific setup.

  2. Check the Requirements for Pods and Services.

  3. Install the istioctl command


Install istioctl

Install the istioctl binary with curl:

  1. Download the latest release with the command:

    $ curl -sL https://istio.io/downloadIstioctl | sh -

  2. Add the istioctl client to your path, on a macOS or Linux system:

    $ export PATH=$PATH:$HOME/.istioctl/bin

  3. You can optionally enable the auto-completion option when working with a bash or ZSH console.


   4. Deploy the Istio operator:

       $ istioctl operator init

   This command runs the operator by creating the following resources in the istio-operator namespace:

  • The operator custom resource definition
  • The operator controller deployment
  • A service to access operator metrics
  • Necessary Istio operator RBAC rules

See the available istioctl operator init flags to control which namespaces the controller and Istio are installed into and the installed Istio image sources and versions.

> operator init error: https://www.digitalocean.com/community/questions/resources-not-ready-after-10m0s-timed-out-waiting-for-the-condition

 

5.gcloud config list

 

[compute]

region = asia-northeast3

zone = asia-northeast3-a

[core]

account = jm84.joo@gmail.com

disable_usage_reporting = False

project = synthetic-nova-278803

 

cluster name = aisland-cluster-1

 

6.update deploy.sh with above information

 

WARNING: `gcloud docker` will not be supported for Docker client versions above 18.03.

 

As an alternative, use `gcloud auth configure-docker` to configure `docker` to

use `gcloud` as a credential helper, then use `docker` as you would for non-GCR

registries, e.g. `docker pull gcr.io/project-id/my-image`. Add

`--verbosity=error` to silence this warning: `gcloud docker

--verbosity=error -- pull gcr.io/project-id/my-image`.

 

>See: https://cloud.google.com/container-registry/docs/support/deprecation-notices#gcloud-docker

> gcloud auth configure-docker, https://github.com/GoogleCloudPlatform/docker-credential-gcr/issues/21

> In deploy.sh, Change "gcloud docker" to "docker" 

 

 

kubectl get deployment

kubectl get service

kubectl get pods

kubectl get ing

 

*delete deployment : https://coreos.com/tectonic/docs/latest/tutorials/sandbox/deleting-deployment.html

 

<test result>

JooJinMyungui-MacBook-Air:petdetailsservice MyMacBookAir$ kubectl get all

NAME                                             READY   STATUS    RESTARTS   AGE

pod/petdetailsservice-v1-55977596bd-smzkc        2/2     Running   0          15m

pod/petdetailsservice-v2-676f4bb7d9-lrq8h        2/2     Running   0          59s

pod/petmedicalhistoryservice-v1-69d94756-8k2ld   2/2     Running   0          22m

pod/petservice-v1-fbbbf7d77-lq56z                2/2     Running   0          41m

 

NAME                               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE

service/kubernetes                 ClusterIP   10.102.0.1      <none>        443/TCP    13d

service/petdetailsservice          ClusterIP   10.102.9.228    <none>        9081/TCP   15m

service/petmedicalhistoryservice   ClusterIP   10.102.14.162   <none>        9082/TCP   22m

service/petservice                 ClusterIP   10.102.11.179   <none>        9080/TCP   78m

 

NAME                                          READY   UP-TO-DATE   AVAILABLE   AGE

deployment.apps/petdetailsservice-v1          1/1     1            1           15m

deployment.apps/petdetailsservice-v2          1/1     1            1           11m

deployment.apps/petmedicalhistoryservice-v1   1/1     1            1           22m

deployment.apps/petservice-v1                 1/1     1            1           78m

 

NAME                                                   DESIRED   CURRENT   READY   AGE

replicaset.apps/petdetailsservice-v1-55977596bd        1         1         1       15m

replicaset.apps/petdetailsservice-v2-676f4bb7d9        1         1         1       59s

replicaset.apps/petdetailsservice-v2-6dff4dbbd4        0         0         0       11m

replicaset.apps/petmedicalhistoryservice-v1-69d94756   1         1         1       22m

replicaset.apps/petservice-v1-5f968d8dd7               0         0         0       78m

replicaset.apps/petservice-v1-fbbbf7d77                1         1         1       41m

JooJinMyungui-MacBook-Air:petdetailsservice MyMacBookAir$ kubectl get ing

NAME                 HOSTS   ADDRESS         PORTS   AGE

gateway              *       34.64.221.179   80      79m

gateway-petdetails   *       34.64.221.179   80      15m

JooJinMyungui-MacBook-Air:petdetailsservice MyMacBookAir$ curl http://34.64.221.179/pet/123

{"petDetails":{"petName":"Maximus","petAge":5,"petOwner":"Nithin Mallya","petBreed":"German Shepherd Dog"},"petMedicalHistory":{"vaccinationList":["Bordetella, Leptospirosis, Rabies, Lyme Disease"]},"dogAPIResponse":{"message":"request to http://api.thedogapi.co.uk:443/v2/dog.php failed, reason: getaddrinfo ENOTFOUND api.thedogapi.co.uk","type":"system","errno":"ENOTFOUND","code":"ENOTFOUND"}}JooJinMyungui-MacBook-Air:petdetailsservice MyMacBookAir$ 

 

* 참고

https://medium.com/google-cloud/simplifying-microservices-with-istio-in-google-kubernetes-engine-part-i-849555f922b8

https://medium.com/google-cloud/simplifying-microservices-with-istio-in-google-kubernetes-engine-part-ii-7461b1833089

https://medium.com/google-cloud/simplifying-microservices-with-istio-in-google-kubernetes-engine-part-iii-6b62876d0a7d

https://istio.io/latest/docs/setup/install/standalone-operator/

https://istio.io/latest/docs/ops/diagnostic-tools/istioctl/

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함