cyberFund / cybernode-archive

🚀 Manager of docker images for cybernomics
MIT License
19 stars 4 forks source link

Setup remote access to GKE cluster #100

Open abitrolly opened 7 years ago

abitrolly commented 7 years ago

To run cybernode instance on Google Container Engine (GKE).

  1. Add your Google account as new member of cybernode-1337 project

https://console.cloud.google.com/iam-admin/iam/project?project=cybernode-1337

  1. Install gcloud tool and authenticate
    curl https://sdk.cloud.google.com | bash
    exec -l $SHELL
    # authenticate
    gcloud auth login

    If kubectl is not installed

    gcloud components install kubectl
  2. Auth to Google Cloud and setup kubectl credentials
    export CLUSTER=cybermarkets
    export ZONE=europe-west3-b
    gcloud container clusters get-credentials $CLUSTER --zone $ZONE --project cybernode-1337
    # access cluster by the context with friendly name 
    kubectl config rename-context `kubectl config current-context` $CLUSTER
  3. View new kubectl settings, see that current-context is set to cybermarkets
    kubectl config view
  4. Get the state of cluster
    kubectl get all