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
| """ | |
| This script uses RSA public/private key pair generated using Openssl command line tool. | |
| The series of steps are listed below | |
| 1. Import openssl generated public/private key pair | |
| 3. Generate the Token using the Private key from step 1 | |
| 4. Validate the JWT Token using the Public key from step 1 | |
| """ | |
| # ______________________________ Step 0 ______________________________________ |
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
| """ | |
| This script generates RSA public/private key pair using python. | |
| And uses the Keys to Generate JWT Token. | |
| The series of steps are listed below | |
| 1. Generate the Key | |
| 2. Generate the Public and Private Keys | |
| 3. Generate the Token using the Private Key from step 2 | |
| 4. Validate the JWT Token using the Public key from step 2 |
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: networking.istio.io/v1alpha3 | |
| kind: VirtualService | |
| metadata: | |
| name: <VIRTUAL_SERVICE_NAME> | |
| spec: | |
| hosts: | |
| - "*" | |
| gateways: | |
| - <GATEWAY_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: networking.istio.io/v1alpha3 | |
| kind: VirtualService | |
| metadata: | |
| name: <VIRTUAL_SERVICE_NAME> | |
| spec: | |
| hosts: | |
| - "*" | |
| gateways: | |
| - <GATEWAY_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: networking.istio.io/v1alpha3 | |
| kind: Gateway | |
| metadata: | |
| name: <GATEWAY_NAME> | |
| spec: | |
| selector: | |
| istio: ingressgateway # use istio default controller | |
| servers: | |
| - port: | |
| number: 80 |
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: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: <APP_NAME> | |
| # REST OF YOUR YAML CONFIG WILL BE AS IT IS | |
| --- | |
| apiVersion: v1 | |
| kind: Service |
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
| gcloud compute firewall-rules list --filter="name~gke-<CLUSTER_NAME>-[0-9a-z]*-master" | |
| gcloud compute firewall-rules update <FIREWALL_RULE_NAME> --allow tcp:10250,tcp:443,tcp:15017 | |
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
| # absolute path to the directory where label_map.pbtxt and input image files are. It must be an absolute path. Docker volume mounting doesn't work with relative path. All other paths in this scripts will work with relative path. | |
| export VOLUME_PATH="" | |
| export SERVER_URL="http://EXTERNAL_IP:8500/v1/models/mnist:predict" | |
| # relative path to the test image. i.e. config/image1.jpg. The path is relative to VOLUME_PATH | |
| export IMAGE_PATH="" | |
| # relative path to the output json. i.e. config/out_image1.json. The path is relative to VOLUME_PATH | |
| export OUTPUT_JSON="" | |
| # relative path to the label_map.pbtxt. i.e. config/label_map.pbtxt. The path is relative to VOLUME_PATH | |
| export LABEL_MAP="" | |
| # Specify True if you want to save the output image. |
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: | |
| labels: | |
| app: mnist | |
| name: mnist-service | |
| namespace: kubeflow | |
| spec: | |
| ports: | |
| - name: grpc-tf-serving |
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: | |
| labels: | |
| app: mnist | |
| name: mnist-service | |
| namespace: kubeflow | |
| spec: | |
| ports: | |
| - name: grpc-tf-serving |