This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl get po,deployments,svc,ing | |
NAME READY STATUS RESTARTS AGE | |
po/be-v1-16151855-4vsz5 2/2 Running 0 25s | |
po/be-v1-16151855-cxvxw 2/2 Running 0 25s | |
po/myapp-v1-2518991625-3z1pv 2/2 Running 0 25s | |
po/myapp-v1-2518991625-crc7s 2/2 Running 0 25s | |
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE | |
deploy/be-v1 2 2 2 2 25s | |
deploy/be-v2 0 0 0 0 25s | |
deploy/myapp-v1 2 2 2 2 25s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: gateway | |
annotations: | |
kubernetes.io/ingress.class: "istio" | |
kubernetes.io/ingress.allowHTTP: "false" | |
spec: | |
tls: | |
- secretName: istio-ingress-certs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: myapp-srv | |
labels: | |
app: myapp | |
spec: | |
ports: | |
- port: 8080 | |
name: http |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: myapp-v1 | |
spec: | |
replicas: 2 | |
template: | |
metadata: | |
labels: | |
app: myapp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl get po,deployments,svc,ing | |
NAME READY STATUS RESTARTS AGE | |
po/be-v1-16151855-7lfrd 2/2 Running 0 33m | |
po/be-v1-16151855-z50n2 2/2 Running 0 33m | |
po/myapp-v1-2518991625-frfd9 2/2 Running 0 33m | |
po/myapp-v1-2518991625-vhh6x 2/2 Running 0 33m | |
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE | |
deploy/be-v1 2 2 2 2 33m | |
deploy/be-v2 0 0 0 0 33m | |
deploy/myapp-v1 2 2 2 2 33m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: config.istio.io/v1alpha2 | |
kind: RouteRule | |
metadata: | |
name: fe-v1-be-v2 | |
spec: | |
precedence: 1 | |
match: | |
source: | |
name: myapp | |
labels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -k https://$GATEWAY_IP/hostz | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb5]","statusCode":200}] | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb5]","statusCode":200}] | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb5]","statusCode":200}]{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb5]","statusCode":200}] | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb5]","statusCode":200}]{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -k https://$GATEWAY_IP/hostz | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v1-16151855-3vs67] node: [gke-cluster-1-default-pool-94718a04-cphx]","statusCode":200}] | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v1-16151855-3vs67] node: [gke-cluster-1-default-pool-94718a04-cphx]","statusCode":200}] | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb5]","statusCode":200}] | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v2-4191276971-rqv5q] node: [gke-cluster-1-default-pool-94718a04-lrb5]","statusCode":200}] | |
[{"url":"http://be.default.svc.cluster.local:8080/backend","body":"pod: [be-v1-16151855-3vs67] node: [gke-cluster-1-default-pool-94718a04-cphx]","statusCode":200}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: config.istio.io/v1alpha2 | |
kind: RouteRule | |
metadata: | |
name: myapp-v1-path | |
spec: | |
precedence: 1 | |
destination: | |
name: myapp | |
match: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: myapp-v2 | |
spec: | |
replicas: 0 | |
template: | |
metadata: | |
labels: | |
app: myapp |