google-kubernetes-engine

How to run Postman test cases by helm and rollback to last successful version if any test fail

风流意气都作罢 提交于 2021-01-29 11:17:11
问题 I am using Helm kubernetes deployment and I want to run the postman test cases before a final deployment, and if any test case fails then rollback (or retain the current deployment like Blue-Green deployment). How to achieve this? 回答1: I achieved the expected behavior with Helm Chart Tests and the postman/newman Docker image. My Helm template for the test execution: apiVersion: v1 kind: Pod metadata: name: API Test annotations: "helm.sh/hook": test-success spec: containers: - name:

How to retrieve credentials of a created Google Kubernetes (GKE) cluster in Ansible?

北城以北 提交于 2021-01-29 09:34:38
问题 I'm creating a cluster and node pool with - name: "Create Google Kubernetes Engine Cluster to be setup with with kubectl" gcp_container_cluster: name: "{{cluster_name}}" project: "{{project_id}}" auth_kind: "serviceaccount" location: "{{cluster_location}}" logging_service: "none" monitoring_service: "none" service_account_contents: "{{service_account_contents}}" initial_node_count: 1 register: cluster - name: "Create node pool for system pods" gcp_container_node_pool: name: "default-pool"

Service entries in Anthos Service Mesh

蓝咒 提交于 2021-01-29 08:27:20
问题 For some test, I have created a ServiceEntry in Anthos Service Mesh. It also works when accessing that service with a curl pod, the headers are set correctly curl -v postman-echo.com/get However, that service entry does not appear neither in the dash board nor in access logs. It seems that dashboard is limited to kubernetes services. If this is the case, is this only a limitation of the ASM dashboard (and maybe available in other installations, for example open source Istio with Kiali) or a

Understanding healthchecks for backend services on GKE when using ingress

让人想犯罪 __ 提交于 2021-01-29 07:07:51
问题 I am using the following code in statefulset.yml apiVersion: apps/v1 kind: StatefulSet metadata: name: geth namespace: prod spec: serviceName: geth-service replicas: 2 selector: matchLabels: app: geth-node template: metadata: labels: app: geth-node spec: containers: - name: geth-node image: <My image> imagePullPolicy: Always livenessProbe: httpGet: path: / port: 8545 initialDelaySeconds: 20 #wait this period after staring fist time periodSeconds: 15 # polling interval timeoutSeconds: 5 # wish

gcloud console can't view gke resources

感情迁移 提交于 2021-01-29 05:49:33
问题 I'm testing permissions on GCP on new project, I've created a user and gave basic storage.objects.get and storage.objects.list permissions and all work, but when I moved to GKE it stopped no matter how many permissions ( container.clusters.* or container.pods.* or the role Kubernetes Engine Cluster Viewer he can't view the resources with the error message Can't access project settings for project <my_project> on service container.googleapis.com [view=CONSUMER_VIEW]. any thoughts what might be

How to set HTTPS as default on GKE Ingress-gce

China☆狼群 提交于 2021-01-29 01:58:39
问题 I currently have a working Frontend and Backend nodeports with an Ingress service setup with GKE's Google-managed certificates. However, my issue is that by default when a user goes to samplesite.com, it uses http as default. This means that the user needs to specifically type in the browser https://samplesite.com in order to get the https version of my website. How do I properly disable http on GKE ingress, or how do I redirect all my traffic to https? I understand that this can be

Google Kubernetes Engine (GKE) cluster `error while creating mount source path` due to `read-only file system`

耗尽温柔 提交于 2021-01-28 12:46:14
问题 I have a container with the following configuration: spec: template: spec: restartPolicy: OnFailure volumes: - name: local-src hostPath: path: /src/analysis/src type: DirectoryOrCreate containers: securityContext: privileged: true capabilities: add: - SYS_ADMIN Note that I'm intentionally omitting some other configuration parameters to keep the question short However, when I deploy it to my cluster on kubernetes on gcloud, I see the following error: Error: failed to start container "market

GCP stackdriver logging logs format changed in bucket from folder per container to stdout\stderr

こ雲淡風輕ζ 提交于 2021-01-28 09:16:13
问题 i have a question, similar as describe here: GKE kubernetes container stdout logs format changed in old version of stackdriver i had 1 sink with filter like this: resource.type=container, resource.namespace_id=[NAMESPACE_NAME] resource.pod_id=[POD_NAME] and logs was stored in bucket pretty well, like this: logName=projects/[PROJECT-NAME]/logs/[CONTAINER-NAME] ...so i had folders whith logs for each container. But now i updated my stackdriver logging+monitoring to last version and now i have 2

How to clean up after a GKE cluster created with gcloud container clusters create?

Deadly 提交于 2021-01-28 09:00:40
问题 I'm creating Kubernetes clusters programmatically for end-to-end tests in GitLab CI/CD. I'm using gcloud container clusters create . I'm doing this for half a year and created and deleted a few hundred clusters. The cost went up and down. Now, I got an unusually high bill from Google and I checked the cost breakdown. I noticed that the cost is >95% for "Storage PD Capacity". I found out that gcloud container clusters delete never deleted the Google Compute Disks created for Persistent Volume

Kubernetes Engine (GCP), how to change Arguments?

北城余情 提交于 2021-01-27 18:44:06
问题 I'm using the "Workloads" service of Kubernetes Engine of Google Cloud Platform to deploy my application. Once you click on deploy I can see in "Cloud Build" what command GCP has launched: The current build command is: build -t gcr.io/ma...g:9e4dab3 -d Dockerfile Is there a way to change the build command ? Like: build -t gcr.io/ma...g:9e4dab3 -d Dockerfile --build-arg APP_ENV=dev 回答1: Workloads is a beta feature, and doesn't include any option to add or modify the build command you can open