$ base64 -i ~/path/to/downloads/credentials.json
‘BASE64_CREDENTIAL_STRING’
apiVersion: v1kind: Secretmetadata: name: google-services-secrettype: Opaquedata: google-services.json: BASE64_CREDENTIAL_STRING
$ oc create -f google-secret.yaml
“GOOGLE_APPLICATION_CREDENTIALS”
apiVersion: v1kind: ReplicationControllermetadata: name: bigquery-controller labels: name: bigquery-controller spec: containers: … env: … - name: GOOGLE_APPLICATION_CREDENTIALS value: /etc/secretspath/google-services.json volumeMounts: - name: secrets mountPath: /etc/secretspath readOnly: true volumes: - name: secrets secret: secretName: google-services-secret
var gcloud = require('gcloud')({ projectId: 'my-project', keyFilename: 'keyfile.json'});var vision = gcloud.vision();vision.detectText('./image.jpg', function(err, text) { if (text.length > 0) { console.log('We found text on this image...'); }});
Use promo code NEXT1720 to save $300 off general admission