23 lines
1006 B
YAML
23 lines
1006 B
YAML
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: google-application-credentials #name of the secret to be mounted
|
|
type: Opaque
|
|
stringData: #file name that will be created to mount
|
|
google-application-credentials.json: |
|
|
{
|
|
"type": "service_account",
|
|
"project_id": "your-project-id",
|
|
"private_key_id": "your-private-key-id",
|
|
"private_key": "your-private-key",
|
|
"client_email": "service-account-email",
|
|
"client_id": "your-client-id",
|
|
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
|
"token_uri": "https://oauth2.googleapis.com/token",
|
|
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
|
"client_x509_cert_url": "client_x509_cert_url"
|
|
}
|
|
|
|
#The same result can be achieved by using this kubectl command in the folder where google-application-credentials.json is
|
|
#kubectl create secret generic google-application-credentials --from-file=google-application-credentials.json=./google-application-credentials.json
|