Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

gcloud service replace yaml error

I try to use gcloud run services replace like this

gcloud run services replace service.yaml --project PROJECT_NAME

but it keep getting error  argument FILE: invalid <googlecloudsdk.calliope.arg_parsers.YAMLFileContents object at 0x00000216D57FAC30> value: 'service.yaml'.

so i try export the original yaml and then use it again like this 

 
gcloud run services describe SERVICE_NAME --format export --region REGION --project PROJECT_NAME > service.yaml
and then, used the new service.yaml, i run 
gcloud run services replace service.yaml --project PROJECT_NAME
 
but but it keep getting error  argument FILE: invalid <googlecloudsdk.calliope.arg_parsers.YAMLFileContents object at . . . .
 
 
 

 

Solved Solved
0 1 305
1 ACCEPTED SOLUTION

I already got the the answer, 

it has because the encoding, it should use UTF-8, encoding.png

And then, the problem disapear

View solution in original post

1 REPLY 1

I already got the the answer, 

it has because the encoding, it should use UTF-8, encoding.png

And then, the problem disapear

Top Solution Authors