Failed to setup Cloudflare Tunnel in GKE

I was trying to setup a Cloudflare Tunnel in my kubernetes cluster in GKE. I’m stuck now. This is what I did so far,

  1. I have installed cloudflared in my personal machine.
  2. Executed “cloudflared tunnel create stage”
  3. Got the output staying tunnel created and credentials path.
  4. Now copied this .json and cert.pem to my kubernetes cluster as secret.

Now when I run the cloudflared deployment in my cluster, I’m getting the following error:

2021-05-24T18:56:33Z ERR The credentials file at /etc/cloudflared/creds/cloudflare.json contained invalid JSON. This is probably caused by passing the wrong filepath. Reminder: the credentials file is a .json file created via cloudflared tunnel create.
2021-05-24T18:56:33Z ERR Invalid JSON when parsing credentials file: invalid character ‘3’ after array element
Invalid JSON when parsing tunnel credentials file

File path is correct only. But I suspect the JSON file. When I opened the JSON file I can just see an array of numbers. It doesn’t looks like a valid JSON file. It was like this [122 23 122 45 21 …] Is that normal?

Then I tried to delete the created tunnel by executing,
cloudflared tunnel delete stage

And I got the error saying “Error deleting tunnel stage: not found”, But when I run list command, I can see the tunnel with name “stage”.

Please help me how to move forward?

Can you share the full output of the json file? Was it present and correct on your personal machine ti begin with?