Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gcp] Enable new stackdriver Kubernetes agents on GKE #1757

Closed
jlewi opened this issue Oct 12, 2018 · 5 comments
Closed

[gcp] Enable new stackdriver Kubernetes agents on GKE #1757

jlewi opened this issue Oct 12, 2018 · 5 comments

Comments

@jlewi
Copy link
Contributor

jlewi commented Oct 12, 2018

To enable the new agents I think we need to set the following in our cluster DM config.

loggingService: logging.googleapis.com/kubernetes
monitoringService: monitoring.googleapis.com/kubernetes

We can verify its enabled in the Cloud console where it should say

Stackdriver Logging	
Enabled v2(beta)
Stackdriver Monitoring	
Enabled v2(beta)
@jlewi
Copy link
Contributor Author

jlewi commented Oct 23, 2018

I think this might need a little bit more work.

It looks like its guarded by gkeApiVersion

{% if properties['gkeApiVersion'] == 'v1beta1' %}

We just need to test it and then maybe document it.

@chrisheecho
Copy link

/remove-priority p1

@jlewi
Copy link
Contributor Author

jlewi commented Oct 25, 2018

/priority p1

@carmine carmine added this to the 0.4.0 milestone Nov 6, 2018
@jlewi
Copy link
Contributor Author

jlewi commented Dec 18, 2018

It looks like the feature is still in beta.
https://cloud.google.com/monitoring/kubernetes-engine/

Beta features are only available through the v1beta1 API
https://cloud.google.com/kubernetes-engine/docs/reference/api-organization#beta

So we need to use that API to create/modify the cluster.

jlewi added a commit to jlewi/kubeflow that referenced this issue Dec 18, 2018
* We want to enable the stackdriver monitoring agents by default. This allows
  pod logs to be fetched by pod label which is very valuable.

* To enable this we need to use the v1beta1 API for GKE
https://cloud.google.com/kubernetes-engine/docs/reference/api-organization#beta

* Remove the field CLUSTER_VERSION from kfctl.sh
  This was added in kubeflow#1888 but it doesn't look like it was actually being
  use to set the CLUSTER_VERSION; it looks like cluster-version is set
  in the deployment manager config cluster-kubeflow.yaml

Related to kubeflow#1757
k8s-ci-robot pushed a commit that referenced this issue Dec 20, 2018
* We want to enable the stackdriver monitoring agents by default. This allows
  pod logs to be fetched by pod label which is very valuable.

* To enable this we need to use the v1beta1 API for GKE
https://cloud.google.com/kubernetes-engine/docs/reference/api-organization#beta

* Remove the field CLUSTER_VERSION from kfctl.sh
  This was added in #1888 but it doesn't look like it was actually being
  use to set the CLUSTER_VERSION; it looks like cluster-version is set
  in the deployment manager config cluster-kubeflow.yaml

Related to #1757
@jlewi
Copy link
Contributor Author

jlewi commented Jan 7, 2019

Confirmed on https://kf-v0-4-n00.endpoints.kubeflow-ci.cloud.goog/ that new stackdriver agents are deployed.

that we are now enabling the new stackedriver agents and that

Using the query

resource.type="k8s_container"
resource.labels.cluster_name="kf-v0-4-n00"
resource.labels.pod_name="ambassador-5cf8cd97d5-7xxdv"

Response

{
 insertId:  "1lfq8cxfvwlpb9"  
 logName:  "projects/kubeflow-ci/logs/stdout"  
 metadata: {
  systemLabels: {…}   
  userLabels: {
   pod-template-hash:  "1794785381"    
   service:  "ambassador"    
  }
 }
 receiveTimestamp:  "2019-01-06T20:08:49.315277338Z"  
 resource: {…}  
 severity:  "INFO"  
 textPayload:  "ACCESS [2019-01-06T20:08:37.965Z] "GET /argo/api/workflows/live HTTP/1.1" 504 UT 0 24 3000 - "108.222.64.88, 35.244.138.24" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" "cc07b564-3e19-424e-83d2-4304f2166b6f" "kf-v0-4-n00.endpoints.kubeflow-ci.cloud.goog" "10.43.254.44:80"
"  
 timestamp:  "2019-01-06T20:08:47Z"  
}

@jlewi jlewi closed this as completed Jan 7, 2019
saffaalvi pushed a commit to StatCan/kubeflow that referenced this issue Feb 11, 2021
* We want to enable the stackdriver monitoring agents by default. This allows
  pod logs to be fetched by pod label which is very valuable.

* To enable this we need to use the v1beta1 API for GKE
https://cloud.google.com/kubernetes-engine/docs/reference/api-organization#beta

* Remove the field CLUSTER_VERSION from kfctl.sh
  This was added in kubeflow#1888 but it doesn't look like it was actually being
  use to set the CLUSTER_VERSION; it looks like cluster-version is set
  in the deployment manager config cluster-kubeflow.yaml

Related to kubeflow#1757
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants