Giter Club home page Giter Club logo

anthos-sample-deployment's Introduction

anthos-sample-deployment's People

Contributors

blueandgold avatar crcsmnky avatar gkowalski-google avatar guanghuil avatar hshin-g avatar kaslin avatar katze120 avatar sandmman avatar subfuzion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anthos-sample-deployment's Issues

Secure anthos script fails to get cluster credentials

Apologies if this just me doing something daft.

Using cloud shell and working through this tutorial, with an unaltered Anthos cluster setup as per the Explore Anthos tutorial I got an error getting the cluster credentials with the setup script:

/usr/bin/gcloud
/usr/bin/kubectl
/usr/bin/git
Your active configuration is: [cloudshell-30932]
export PROJECT as anthos-demo-337713
export KUBECONFIG as /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=404, message=Not found: projects/anthos-demo-337713/zones/europe-west4-a/clusters/LOCATION:.
No cluster named 'LOCATION:' in anthos-demo-337713.
W0109 15:53:37.729767     583 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: cannot rename the context "gke_anthos-demo-337713_europe-west4-a_LOCATION:", it's not in /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=400, message=Location "1.21.5-gke.1302" does not exist.
W0109 15:53:38.497195     606 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: cannot rename the context "gke_anthos-demo-337713_1.21.5-gke.1302_MASTER_VERSION:", it's not in /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=400, message=Location "35.204.154.239" does not exist.
W0109 15:53:39.264781     629 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: cannot rename the context "gke_anthos-demo-337713_35.204.154.239_MASTER_IP:", it's not in /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=400, message=Location "e2-standard-2" does not exist.
W0109 15:53:40.022501     652 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: cannot rename the context "gke_anthos-demo-337713_e2-standard-2_MACHINE_TYPE:", it's not in /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=400, message=Location "1.21.5-gke.1302" does not exist.
W0109 15:53:40.789882     675 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: cannot rename the context "gke_anthos-demo-337713_1.21.5-gke.1302_NODE_VERSION:", it's not in /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=400, message=Location "3" does not exist.
W0109 15:53:41.531824     697 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: cannot rename the context "gke_anthos-demo-337713_3_NUM_NODES:", it's not in /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) ResponseError: code=400, message=Location "RUNNING" does not exist.
W0109 15:53:42.272213     720 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: cannot rename the context "gke_anthos-demo-337713_RUNNING_STATUS:", it's not in /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
/usr/local/bin/istioctl
istioctl already installed.
/usr/local/bin/nomos
nomos already installed.
Backing up current ACM config repo (anthos-sample-deployment-config-repo) to /tmp/anthos-sample-deployment-config-repo-1641743622
Cloned ACM config repo: ./anthos-sample-deployment-config-repo
W0109 15:53:45.045694     765 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
W0109 15:53:45.093797     773 loader.go:221] Config not found: /home/timothy_d_drysdale/.kube/anthos-demo-337713.anthos-trial-gcp.config
error: empty context names are not allowed

<snip>

This occurred both before and after enabling the service account necessary for this cluster (see confirmation of correct access permissions below, with successful manual request)

Initial thoughts on the possible cause:

I decided to work through the script manually and it looks like the script might be iterating over each token, not each line, because of the keywords like LOCATION, RUNNING, e2-standard etc showing up as attempted cluster names etc.

$ gcloud container clusters list 
NAME                    LOCATION        MASTER_VERSION   MASTER_IP       MACHINE_TYPE   NODE_VERSION     NUM_NODES  STATUS
anthos-sample-cluster1  europe-west4-a  1.21.5-gke.1302  xx.xxx.xxx.xxx  e2-standard-2  1.21.5-gke.1302  3          RUNNING

Running the command manually, as I think it should be constructed, works as expected:

$ gcloud container clusters get-credentials anthos-sample-cluster1 --zone=europe-west4-a
Fetching cluster endpoint and auth data.
kubeconfig entry generated for anthos-sample-cluster1.

Org Policy Requiring Shielded VM's not Detected

Ran asd-prereq-checker.sh, result
...
PASS: Org Policy will allow this deployment.
...

Deployment subsequently failed due to Require Shielded VM Org Policy preventing deployment of VM.

(This was just a minor issue and easily fixed by reverting the policy; the policy is not enabled by default but I had previously turned it on.)

Is their any reason why the demo could not use Shielded VMs?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.