redspread / spread

Docker to Kubernetes in one command
https://coreos.com
Apache License 2.0
1.84k stars 83 forks source link

How to deploy to GCE? #168

Open Zhomart opened 7 years ago

Zhomart commented 7 years ago

I've read the documentations, but couldn't understand how to deploy my app. Currently it asks Username/Password twice.

I Google's GCE kubernetes. I've already logged in to gcloud on my computer and got cluster credentials using $ gcloud container clusters get-credentials cluster-name.

My app consists of multiple my own services and mongodb, redis.

I'm creating separate spread repo for each service. Currently trying to deploy redis. Here is the structure:

$ tree -a
.
├── .spread
│   ├── .gitignore
│   └── git .....
├── redis.rc.yml
└── rs
    └── svc.yml

11 directories, 8 files

When I do spread deploy . it asks Username and Password. I don't understand what username/password it asks.

$ spread deploy .
Please enter Username: asd
Please enter Password: asd
Please enter Username: asd
Please enter Password: asd
Deploying 2 objects using the default context.
Did not deploy.: could not get 'default/redis-svc' (Service): the server has asked for the client to provide credentials (get services redis-svc)

Command kubectl works fine.

onbjerg commented 7 years ago

Seems like it doesn't detect the credentials for some reason.

The username/password is likely the username/password for the k8s API.

You can find this in GKE under GKE > Your cluster and then by clicking "Show credentials" on your master node.