Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yamamoto-febc/1a272ec2bbf28b5b3ddaf6adfc3d712f to your computer and use it in GitHub Desktop.
Save yamamoto-febc/1a272ec2bbf28b5b3ddaf6adfc3d712f to your computer and use it in GitHub Desktop.
Rioの動作確認ログ
$ kubectl get all --all-namespaces

NAMESPACE          NAME                                 READY     STATUS    RESTARTS   AGE
coredns-37390e68   pod/coredns-5cdbd55895-p7sgb         1/1       Running   0          12m
istio-095b8502     pod/istio-citadel-c49d8995c-tnm4x    1/1       Running   0          12m
istio-095b8502     pod/istio-gateway-868ff87668-bmspd   1/1       Running   0          12m
istio-095b8502     pod/istio-pilot-787795d8dd-4ttzf     2/2       Running   0          12m

NAMESPACE          NAME                    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
coredns-37390e68   service/coredns         ClusterIP   10.43.0.10      <none>        53/UDP,53/TCP,9153/TCP   12m
default            service/kubernetes      ClusterIP   10.43.0.1       <none>        443/TCP                  12m
istio-095b8502     service/istio-citadel   ClusterIP   10.43.21.151    <none>        80/TCP                   12m
istio-095b8502     service/istio-gateway   ClusterIP   10.43.231.206   <none>        80/TCP                   12m
istio-095b8502     service/istio-pilot     ClusterIP   10.43.19.189    <none>        15007/TCP,15010/TCP      12m

NAMESPACE          NAME                            DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
coredns-37390e68   deployment.apps/coredns         1         1         1            1           12m
istio-095b8502     deployment.apps/istio-citadel   1         1         1            1           12m
istio-095b8502     deployment.apps/istio-gateway   1         1         1            1           12m
istio-095b8502     deployment.apps/istio-pilot     1         1         1            1           12m

NAMESPACE          NAME                                       DESIRED   CURRENT   READY     AGE
coredns-37390e68   replicaset.apps/coredns-5cdbd55895         1         1         1         12m
istio-095b8502     replicaset.apps/istio-citadel-c49d8995c    1         1         1         12m
istio-095b8502     replicaset.apps/istio-gateway-868ff87668   1         1         1         12m
istio-095b8502     replicaset.apps/istio-pilot-546c7894d8     0         0         0         11m
istio-095b8502     replicaset.apps/istio-pilot-787795d8dd     1         1         1         12m
$ kubectl get crds 
NAME                                   CREATED AT
configs.rio.cattle.io                  2018-08-08T08:58:38Z
destinationpolicies.config.istio.io    2018-08-08T08:59:50Z
destinationrules.networking.istio.io   2018-08-08T08:59:52Z
egressrules.config.istio.io            2018-08-08T08:59:50Z
gateways.networking.istio.io           2018-08-08T08:58:37Z
httpapispecbindings.config.istio.io    2018-08-08T08:59:50Z
httpapispecs.config.istio.io           2018-08-08T08:59:50Z
listenconfigs.space.cattle.io          2018-08-08T08:58:38Z
policies.authentication.istio.io       2018-08-08T08:59:52Z
quotaspecbindings.config.istio.io      2018-08-08T08:59:50Z
quotaspecs.config.istio.io             2018-08-08T08:59:50Z
routerules.config.istio.io             2018-08-08T08:59:50Z
routesets.rio.cattle.io                2018-08-08T08:58:38Z
serviceentries.networking.istio.io     2018-08-08T08:59:52Z
servicerolebindings.config.istio.io    2018-08-08T08:59:50Z
serviceroles.config.istio.io           2018-08-08T08:59:50Z
services.rio.cattle.io                 2018-08-08T08:58:38Z
stacks.rio.cattle.io                   2018-08-08T08:58:38Z
virtualservices.networking.istio.io    2018-08-08T08:58:37Z
volumes.rio.cattle.io                  2018-08-08T08:58:38Z

それぞれの中身

$ kubectl get --all-namespaces configs.rio.cattle.io
NAMESPACE          NAME      CREATED AT
coredns-37390e68   conf      15m
istio-095b8502     mesh      15m

$ kubectl get --all-namespaces destinationpolicies.config.istio.io
No resources found.

$ kubectl get --all-namespaces destinationrules.networking.istio.io
No resources found.

$ kubectl get --all-namespaces egressrules.config.istio.io
No resources found.

$ kubectl get --all-namespaces gateways.networking.istio.io
No resources found.

$ kubectl get --all-namespaces httpapispecbindings.config.istio.io
No resources found.

$ kubectl get --all-namespaces httpapispecs.config.istio.io
No resources found.

$ kubectl get --all-namespaces listenconfigs.space.cattle.io
NAME         CREATED AT
cli-config   15m

$ kubectl get --all-namespaces policies.authentication.istio.io
No resources found.

$ kubectl get --all-namespaces quotaspecbindings.config.istio.io
No resources found.

$ kubectl get --all-namespaces quotaspecs.config.istio.io
No resources found.

$ kubectl get --all-namespaces routerules.config.istio.io
No resources found.

$ kubectl get --all-namespaces routesets.rio.cattle.io
No resources found.

$ kubectl get --all-namespaces serviceentries.networking.istio.io
No resources found.

$ kubectl get --all-namespaces servicerolebindings.config.istio.io
No resources found.

$ kubectl get --all-namespaces serviceroles.config.istio.io
No resources found.

$ kubectl get --all-namespaces services.rio.cattle.io
NAMESPACE          NAME            CREATED AT
coredns-37390e68   coredns         15m
istio-095b8502     istio-citadel   15m
istio-095b8502     istio-gateway   15m
istio-095b8502     istio-pilot     15m

$ kubectl get --all-namespaces stacks.rio.cattle.io
NAMESPACE    NAME      CREATED AT
rio-system   coredns   15m
rio-system   istio     15m

$ kubectl get --all-namespaces virtualservices.networking.istio.io
No resources found.

$ kubectl get --all-namespaces volumes.rio.cattle.io
No resources found.
kubectl get all --all-namespaces
NAMESPACE          NAME                                 READY     STATUS    RESTARTS   AGE
coredns-37390e68   pod/coredns-5cdbd55895-p7sgb         1/1       Running   0          20m
default-265db573   pod/rio-demo-9f94f99d5-9qbvl         2/2       Running   0          1m
default-265db573   pod/rio-demo-9f94f99d5-dcfsk         2/2       Running   0          1m
default-265db573   pod/rio-demo-9f94f99d5-g6ddz         2/2       Running   0          1m
istio-095b8502     pod/istio-citadel-c49d8995c-tnm4x    1/1       Running   0          20m
istio-095b8502     pod/istio-gateway-868ff87668-bmspd   1/1       Running   0          20m
istio-095b8502     pod/istio-pilot-787795d8dd-4ttzf     2/2       Running   0          20m

NAMESPACE          NAME                    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
coredns-37390e68   service/coredns         ClusterIP   10.43.0.10      <none>        53/UDP,53/TCP,9153/TCP   20m
default-265db573   service/rio-demo        ClusterIP   10.43.235.34    <none>        80/TCP                   1m
default            service/kubernetes      ClusterIP   10.43.0.1       <none>        443/TCP                  20m
istio-095b8502     service/istio-citadel   ClusterIP   10.43.21.151    <none>        80/TCP                   20m
istio-095b8502     service/istio-gateway   ClusterIP   10.43.231.206   <none>        80/TCP                   20m
istio-095b8502     service/istio-pilot     ClusterIP   10.43.19.189    <none>        15007/TCP,15010/TCP      20m

NAMESPACE          NAME                            DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
coredns-37390e68   deployment.apps/coredns         1         1         1            1           20m
default-265db573   deployment.apps/rio-demo        3         3         3            3           1m
istio-095b8502     deployment.apps/istio-citadel   1         1         1            1           20m
istio-095b8502     deployment.apps/istio-gateway   1         1         1            1           20m
istio-095b8502     deployment.apps/istio-pilot     1         1         1            1           20m

NAMESPACE          NAME                                       DESIRED   CURRENT   READY     AGE
coredns-37390e68   replicaset.apps/coredns-5cdbd55895         1         1         1         20m
default-265db573   replicaset.apps/rio-demo-9f94f99d5         3         3         3         1m
istio-095b8502     replicaset.apps/istio-citadel-c49d8995c    1         1         1         20m
istio-095b8502     replicaset.apps/istio-gateway-868ff87668   1         1         1         20m
istio-095b8502     replicaset.apps/istio-pilot-546c7894d8     0         0         0         19m
istio-095b8502     replicaset.apps/istio-pilot-787795d8dd     1         1         1         20m
$ kubectl get --all-namespaces destinationrules.networking.istio.io
NAMESPACE          NAME       CREATED AT
default-265db573   rio-demo   2m

$ kubectl get --all-namespaces gateways.networking.istio.io
NAMESPACE    NAME       CREATED AT
rio-system   external   2m

$ kubectl get --all-namespaces virtualservices.networking.istio.io
NAMESPACE          NAME       CREATED AT
default-265db573   rio-demo   2m

CRの詳細

Istio Gateway

$ kubectl get gateways.networking.istio.io -o yaml -n rio-system external
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  clusterName: ""
  creationTimestamp: 2018-08-08T09:17:42Z
  generation: 1
  name: external
  namespace: rio-system
  resourceVersion: "1169"
  selfLink: /apis/networking.istio.io/v1alpha3/namespaces/rio-system/gateways/external
  uid: e78bc370-9aeb-11e8-8aa9-9ca3ba3060dd
spec:
  selector:
    gateway: external
  servers:
  - hosts:
    - '*'
    port:
      number: 80
      protocol: http

Istio Virtual Services

$ kubectl get virtualservices.networking.istio.io -o yaml -n default-265db573 rio-demo
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","metadata":{"annotations":{"rio.cattle.io/ports":"80"},"creationTimestamp":null,"labels":{"apply.cattle.io/generationID":"0","apply.cattle.io/groupID":"stackdeploy-mesh-default-265db573","rio.cattle.io":"true","rio.cattle.io/namespace":"default-265db573","rio.cattle.io/revision":"latest","rio.cattle.io/service":"rio-demo"},"name":"rio-demo","namespace":"default-265db573"},"spec":{"gateways":["mesh","external.rio-system.svc.cluster.local"],"hosts":["rio-demo","rio-demo.default.cr2ch1.lb.rancher.cloud"],"http":[{"match":[{"gateways":["mesh","external.rio-system.svc.cluster.local"],"port":80}],"route":[{"destination":{"host":"rio-demo","port":{"number":80},"subset":"latest"},"weight":100}]}]}}
    rio.cattle.io/ports: "80"
  clusterName: ""
  creationTimestamp: 2018-08-08T09:17:42Z
  generation: 1
  labels:
    apply.cattle.io/generationID: "0"
    apply.cattle.io/groupID: stackdeploy-mesh-default-265db573
    rio.cattle.io: "true"
    rio.cattle.io/namespace: default-265db573
    rio.cattle.io/revision: latest
    rio.cattle.io/service: rio-demo
  name: rio-demo
  namespace: default-265db573
  resourceVersion: "1168"
  selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default-265db573/virtualservices/rio-demo
  uid: e78a5773-9aeb-11e8-8aa9-9ca3ba3060dd
spec:
  gateways:
  - mesh
  - external.rio-system.svc.cluster.local
  hosts:
  - rio-demo
  - rio-demo.default.cr2ch1.lb.rancher.cloud
  http:
  - match:
    - gateways:
      - mesh
      - external.rio-system.svc.cluster.local
      port: 80
    route:
    - destination:
        host: rio-demo
        port:
          number: 80
        subset: latest
      weight: 100

Istio Destination Rules

$ kubectl get destinationrules.networking.istio.io -o yaml -n default-265db573 rio-demo 
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.istio.io/v1alpha3","kind":"DestinationRule","metadata":{"annotations":{},"creationTimestamp":null,"labels":{"apply.cattle.io/generationID":"0","apply.cattle.io/groupID":"stackdeploy-mesh-default-265db573","rio.cattle.io":"true","rio.cattle.io/namespace":"default-265db573","rio.cattle.io/service":"rio-demo"},"name":"rio-demo","namespace":"default-265db573"},"spec":{"host":"rio-demo","subsets":[{"labels":{"rio.cattle.io/revision":"latest"},"name":"latest"}]}}
  clusterName: ""
  creationTimestamp: 2018-08-08T09:17:42Z
  generation: 1
  labels:
    apply.cattle.io/generationID: "0"
    apply.cattle.io/groupID: stackdeploy-mesh-default-265db573
    rio.cattle.io: "true"
    rio.cattle.io/namespace: default-265db573
    rio.cattle.io/service: rio-demo
  name: rio-demo
  namespace: default-265db573
  resourceVersion: "1167"
  selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default-265db573/destinationrules/rio-demo
  uid: e7863d0b-9aeb-11e8-8aa9-9ca3ba3060dd
spec:
  host: rio-demo
  subsets:
  - labels:
      rio.cattle.io/revision: latest
    name: latest
$ kubectl get all --all-namespaces
NAMESPACE          NAME                                 READY     STATUS    RESTARTS   AGE
coredns-37390e68   pod/coredns-5cdbd55895-p7sgb         1/1       Running   1          1h
default-265db573   pod/rio-demo-9f94f99d5-bj5th         2/2       Running   0          2m
default-265db573   pod/rio-demo-9f94f99d5-n5qpk         2/2       Running   0          2m
default-265db573   pod/rio-demo-9f94f99d5-p9f29         2/2       Running   0          2m
default-265db573   pod/rio-demo-v3-78d46cb6cf-hfz6m     2/2       Running   0          1m
default-265db573   pod/rio-demo-v3-78d46cb6cf-nc4k6     2/2       Running   0          1m
default-265db573   pod/rio-demo-v3-78d46cb6cf-tbfnv     2/2       Running   0          1m
istio-095b8502     pod/istio-citadel-c49d8995c-tnm4x    1/1       Running   1          1h
istio-095b8502     pod/istio-gateway-868ff87668-bmspd   1/1       Running   0          1h
istio-095b8502     pod/istio-pilot-787795d8dd-4ttzf     2/2       Running   2          1h

NAMESPACE          NAME                    TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
coredns-37390e68   service/coredns         ClusterIP   10.43.0.10      <none>        53/UDP,53/TCP,9153/TCP   1h
default-265db573   service/rio-demo        ClusterIP   10.43.78.206    <none>        80/TCP                   2m
default-265db573   service/rio-demo-v3     ClusterIP   10.43.90.122    <none>        80/TCP                   1m
default            service/kubernetes      ClusterIP   10.43.0.1       <none>        443/TCP                  1h
istio-095b8502     service/istio-citadel   ClusterIP   10.43.21.151    <none>        80/TCP                   1h
istio-095b8502     service/istio-gateway   ClusterIP   10.43.231.206   <none>        80/TCP                   1h
istio-095b8502     service/istio-pilot     ClusterIP   10.43.19.189    <none>        15007/TCP,15010/TCP      1h

NAMESPACE          NAME                            DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
coredns-37390e68   deployment.apps/coredns         1         1         1            1           1h
default-265db573   deployment.apps/rio-demo        3         3         3            3           2m
default-265db573   deployment.apps/rio-demo-v3     3         3         3            3           1m
istio-095b8502     deployment.apps/istio-citadel   1         1         1            1           1h
istio-095b8502     deployment.apps/istio-gateway   1         1         1            1           1h
istio-095b8502     deployment.apps/istio-pilot     1         1         1            1           1h

NAMESPACE          NAME                                       DESIRED   CURRENT   READY     AGE
coredns-37390e68   replicaset.apps/coredns-5cdbd55895         1         1         1         1h
default-265db573   replicaset.apps/rio-demo-9f94f99d5         3         3         3         2m
default-265db573   replicaset.apps/rio-demo-v3-78d46cb6cf     3         3         3         1m
istio-095b8502     replicaset.apps/istio-citadel-c49d8995c    1         1         1         1h
istio-095b8502     replicaset.apps/istio-gateway-868ff87668   1         1         1         1h
istio-095b8502     replicaset.apps/istio-pilot-546c7894d8     0         0         0         1h
istio-095b8502     replicaset.apps/istio-pilot-787795d8dd     1         1         1         1h
$ kubectl get --all-namespaces destinationrules.networking.istio.io
NAMESPACE          NAME       CREATED AT
default-265db573   rio-demo   2m

$ kubectl get --all-namespaces gateways.networking.istio.io
NAMESPACE    NAME       CREATED AT
rio-system   external   2m

$ kubectl get --all-namespaces virtualservices.networking.istio.io
NAMESPACE          NAME          CREATED AT
default-265db573   rio-demo      2m
default-265db573   rio-demo-v3   1m

Istio Virtual Services

$ kubectl get virtualservices.networking.istio.io -o yaml -n default-265db573 rio-demo-v3
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","metadata":{"annotations":{"rio.cattle.io/ports":"80"},"creationTimestamp":null,"labels":{"apply.cattle.io/generationID":"0","apply.cattle.io/groupID":"stackdeploy-mesh-default-265db573","rio.cattle.io":"true","rio.cattle.io/namespace":"default-265db573","rio.cattle.io/revision":"v3","rio.cattle.io/service":"rio-demo"},"name":"rio-demo-v3","namespace":"default-265db573"},"spec":{"gateways":["mesh","external.rio-system.svc.cluster.local"],"hosts":["rio-demo-v3","rio-demo-v3.default.cr2ch1.lb.rancher.cloud"],"http":[{"match":[{"gateways":["mesh","external.rio-system.svc.cluster.local"],"port":80}],"route":[{"destination":{"host":"rio-demo","port":{"number":80},"subset":"v3"},"weight":100}]}]}}
    rio.cattle.io/ports: "80"
  clusterName: ""
  creationTimestamp: 2018-08-08T10:07:15Z
  generation: 1
  labels:
    apply.cattle.io/generationID: "0"
    apply.cattle.io/groupID: stackdeploy-mesh-default-265db573
    rio.cattle.io: "true"
    rio.cattle.io/namespace: default-265db573
    rio.cattle.io/revision: v3
    rio.cattle.io/service: rio-demo
  name: rio-demo-v3
  namespace: default-265db573
  resourceVersion: "3656"
  selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default-265db573/virtualservices/rio-demo-v3
  uid: d3638200-9af2-11e8-bff9-9ca3ba3060dd
spec:
  gateways:
  - mesh
  - external.rio-system.svc.cluster.local
  hosts:
  - rio-demo-v3
  - rio-demo-v3.default.cr2ch1.lb.rancher.cloud
  http:
  - match:
    - gateways:
      - mesh
      - external.rio-system.svc.cluster.local
      port: 80
    route:
    - destination:
        host: rio-demo
        port:
          number: 80
        subset: v3
      weight: 100

Destination Rules

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.istio.io/v1alpha3","kind":"DestinationRule","metadata":{"annotations":{},"creationTimestamp":null,"labels":{"apply.cattle.io/generationID":"0","apply.cattle.io/groupID":"stackdeploy-mesh-default-265db573","rio.cattle.io":"true","rio.cattle.io/namespace":"default-265db573","rio.cattle.io/service":"rio-demo"},"name":"rio-demo","namespace":"default-265db573"},"spec":{"host":"rio-demo","subsets":[{"labels":{"rio.cattle.io/revision":"latest"},"name":"latest"},{"labels":{"rio.cattle.io/revision":"v3"},"name":"v3"}]}}
  clusterName: ""
  creationTimestamp: 2018-08-08T10:06:23Z
  generation: 1
  labels:
    apply.cattle.io/generationID: "0"
    apply.cattle.io/groupID: stackdeploy-mesh-default-265db573
    rio.cattle.io: "true"
    rio.cattle.io/namespace: default-265db573
    rio.cattle.io/service: rio-demo
  name: rio-demo
  namespace: default-265db573
  resourceVersion: "3655"
  selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default-265db573/destinationrules/rio-demo
  uid: b4b7983c-9af2-11e8-bff9-9ca3ba3060dd
spec:
  host: rio-demo
  subsets:
  - labels:
      rio.cattle.io/revision: latest
    name: latest
  - labels:
      rio.cattle.io/revision: v3
    name: v3

weight直後

$ kubectl get virtualservices.networking.istio.io -o yaml -n default-265db573 rio-demo   

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","metadata":{"annotations":{"rio.cattle.io/ports":"80"},"creationTimestamp":null,"labels":{"apply.cattle.io/generationID":"0","apply.cattle.io/groupID":"stackdeploy-mesh-default-265db573","rio.cattle.io":"true","rio.cattle.io/namespace":"default-265db573","rio.cattle.io/revision":"latest","rio.cattle.io/service":"rio-demo"},"name":"rio-demo","namespace":"default-265db573"},"spec":{"gateways":["mesh","external.rio-system.svc.cluster.local"],"hosts":["rio-demo","rio-demo.default.cr2ch1.lb.rancher.cloud"],"http":[{"match":[{"gateways":["mesh","external.rio-system.svc.cluster.local"],"port":80}],"route":[{"destination":{"host":"rio-demo","port":{"number":80},"subset":"latest"},"weight":80},{"destination":{"host":"rio-demo","port":{"number":80}},"weight":20}]}]}}
    rio.cattle.io/ports: "80"
  clusterName: ""
  creationTimestamp: 2018-08-08T10:06:23Z
  generation: 1
  labels:
    apply.cattle.io/generationID: "0"
    apply.cattle.io/groupID: stackdeploy-mesh-default-265db573
    rio.cattle.io: "true"
    rio.cattle.io/namespace: default-265db573
    rio.cattle.io/revision: latest
    rio.cattle.io/service: rio-demo
  name: rio-demo
  namespace: default-265db573
  resourceVersion: "4091"
  selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default-265db573/virtualservices/rio-demo
  uid: b4b84da5-9af2-11e8-bff9-9ca3ba3060dd
spec:
  gateways:
  - mesh
  - external.rio-system.svc.cluster.local
  hosts:
  - rio-demo
  - rio-demo.default.cr2ch1.lb.rancher.cloud
  http:
  - match:
    - gateways:
      - mesh
      - external.rio-system.svc.cluster.local
      port: 80
    route:
    - destination:
        host: rio-demo
        port:
          number: 80
        subset: latest
      weight: 80
    - destination:
        host: rio-demo
        port:
          number: 80
      weight: 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment