This repository contains scripts that can be used in conjunction with the Anthos Sample Deployment on Google Cloud.
googlecloudplatform / anthos-sample-deployment Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
This repository contains scripts that can be used in conjunction with the Anthos Sample Deployment on Google Cloud.
The container images in the k8-manifests are out of date. This causes broken images when deployed.
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.
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?
Needed to add istioctl analyze
to sample deployment tutorial
anthos-sample-deployment/config-repo/namespaces/istio-system/
is missing the file peer-authentication.yaml
the Anthos Sample deployment tutorial mentions this file.
You can create it yourself of course, but it might be misleading to some novice users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.