Giter Club home page Giter Club logo

googlecloudplatform / gke-logging-sinks-demo Goto Github PK

View Code? Open in Web Editor NEW
52.0 30.0 62.0 475 KB

This project describes the steps required to deploy a sample application to Kubernetes Engine that forwards log events to Stackdriver Logging. As a part of the exercise, you will create a Cloud Storage bucket and a BigQuery dataset for exporting log data.

License: Apache License 2.0

Makefile 6.29% Shell 39.64% HCL 21.57% Python 32.50%
kubernetes kubernetes-engine logging google-cloud-platform gke-helmsman gke

gke-logging-sinks-demo's Issues

Error: "zone": [REMOVED] Use location instead

I am getting following error while I am following Logging with Stackdriver on Kubernetes Engine guide on Qwiklabs.

It seems "zone" is no longer supported in terraform as per https://www.terraform.io/docs/providers/google/d/google_container_engine_versions.html.

I have created a pull request to fix this in #35, please review.

student_01_5baa690b0dc9@cloudshell:~/gke-logging-sinks-demo (qwiklabs-gcp-01-3d7a402c8541)$ make create
Your active configuration is: [cloudshell-20845]
Your active configuration is: [cloudshell-20845]
Your active configuration is: [cloudshell-20845]
Operation "operations/acf.fc2378d4-5aa0-4eec-be6f-4b958c9239ce" finished successfully.
Your active configuration is: [cloudshell-20845]
Your active configuration is: [cloudshell-20845]
Your active configuration is: [cloudshell-20845]

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "google" (hashicorp/google) 3.3.0...
- Downloading plugin for provider "random" (hashicorp/random) 2.2.1...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.google: version = "~> 3.3"
* provider.random: version = "~> 2.2"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Error: "zone": [REMOVED] Use location instead

  on main.tf line 28, in data "google_container_engine_versions" "on-prem":
  28: data "google_container_engine_versions" "on-prem" {


Makefile:34: recipe for target 'create' failed
make: *** [create] Error 1
student_01_5baa690b0dc9@cloudshell:~/gke-logging-sinks-demo (qwiklabs-gcp-01-3d7a402c8541)$

kubectl run fix

Hey, I'm a lab architect with the Google Qwiklabs team, and the issue with kubectl run being deprecated is keeping a lab that uses this repo from being operational. We're getting the error message in the screenshot attached.
zone_depricated_error

Someone proposed a fix in another issue, and I came to the same solution that I have ready on another branch if you'd be willing to let me push a branch and make a pull request.

Otherwise changing kubectl run to kubectl create deployment in line 90 of main.tf seems to be the fix:

command = "kubectl --namespace default create deployment hello-server --image gcr.io/google-samples/hello-app:1.0"

command = "kubectl --namespace default expose deployment hello-server --type \"LoadBalancer\" --port 80 --target-port 8080"

Hope we can get this resolved!

logs propagating to Cloud Storage

Instructions to return to Cloud Storage to see the Sinks propagate in the bucket, but I'm not seeing anything. Is it still happeing?

text from lab:
If you come back to the bucket towards the end of your lab you might see folders corresponding to pods running in the cluster (e.g. autoscaler, dnsmasq, etc.).

Currently there are only 2 tables being created in the BigQuery dataset, so maybe they are NOT getting sent to the bucket?
bq_editor_gke_logs

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.