{"id":165,"date":"2018-05-21T17:02:14","date_gmt":"2018-05-21T09:02:14","guid":{"rendered":"http:\/\/www.heoffice.com\/?p=165"},"modified":"2018-05-21T18:27:08","modified_gmt":"2018-05-21T10:27:08","slug":"kubernete-install-tick-charts-on-mac","status":"publish","type":"post","link":"https:\/\/heoffice.com\/?p=165","title":{"rendered":"Kubernete install TICK-charts on mac"},"content":{"rendered":"<h3>\u53c2\u8003<\/h3>\n<p>https:\/\/github.com\/influxdata\/tick-charts<\/p>\n<h4>Step 1: Install helm &amp; check tilller installed<\/h4>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">brew install kubernetes-helm\nhelm init\nkubectl get pods --namespace kube-system\n<\/code><\/pre>\n<p>\u663e\u793a<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-null\">$  kubectl get pods --namespace kube-system\nNAME                                    READY     STATUS    RESTARTS   AGE\netcd-minikube                           1\/1       Running   0          4d\nkube-addon-manager-minikube             1\/1       Running   5          5d\nkube-apiserver-minikube                 1\/1       Running   0          4d\nkube-controller-manager-minikube        1\/1       Running   0          4d\nkube-dns-86f4d74b45-4zzs2               3\/3       Running   17         5d\nkube-proxy-4lr75                        1\/1       Running   0          4d\nkube-scheduler-minikube                 1\/1       Running   2          4d\nkubernetes-dashboard-5498ccf677-xbc5f   1\/1       Running   13         5d\nstorage-provisioner                     1\/1       Running   15         5d\ntiller-deploy-f9b8476d-2wnzh            1\/1       Running   0          3d\n<\/code><\/pre>\n<h4>Step 2:<\/h4>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">cd ~\ngit clone git clone git@github.com:influxdata\/tick-charts.git\ncd tick-charts\nhelm install --name data --namespace tick .\/influxdb\/\nhelm install --name polling --namespace tick .\/telegraf-s\/\nhelm install --name hosts --namespace tick .\/telegraf-ds\/\nhelm install --name alerts --namespace tick .\/kapacitor\/\nhelm install --name dash --namespace tick .\/chronograf\/\n<\/code><\/pre>\n<p>\u663e\u793a<\/p>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">GuoweiHedeMacBook-Pro:tick-charts guowei.he$  helm install --name data --namespace tick .\/influxdb\/\nNAME:   data\nLAST DEPLOYED: Mon May 21 17:07:39 2018\nNAMESPACE: tick\nSTATUS: DEPLOYED\n\nRESOURCES:\n==&gt; v1\/ConfigMap\nNAME           DATA  AGE\ndata-influxdb  1     1s\n\n==&gt; v1\/Service\nNAME           TYPE       CLUSTER-IP  EXTERNAL-IP  PORT(S)   AGE\ndata-influxdb  ClusterIP  10.109.7.9  &lt;none&gt;       8086\/TCP  1s\n\n==&gt; v1beta1\/Deployment\nNAME           DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE\ndata-influxdb  1        0        0           0          1s\n\n==&gt; v1\/Pod(related)\nNAME                           READY  STATUS   RESTARTS  AGE\ndata-influxdb-ff95b6484-p5cnt  0\/1    Pending  0         1s\n\n\nNOTES:\nInfluxDB can be accessed via port 8086 on the following DNS name from within your cluster:\n\n- http:\/\/data-influxdb.tick:8086\n\nYou can easily connect to the remote instance with your local influx cli. To forward the API port to localhost:8086 run the following:\n\n- kubectl port-forward --namespace tick $(kubectl get pods --namespace tick -l app=data-influxdb -o jsonpath='{ .items[0].metadata.name }') 8086:8086\n\nYou can also connect to the influx cli from inside the container. To open a shell session in the InfluxDB pod run the following:\n\n- kubectl exec -i -t --namespace tick $(kubectl get pods --namespace tick -l app=data-influxdb -o jsonpath='{.items[0].metadata.name}') \/bin\/sh\n\nTo tail the logs for the InfluxDB pod run the following:\n\n- kubectl logs -f --namespace tick $(kubectl get pods --namespace tick -l app=data-influxdb -o jsonpath='{ .items[0].metadata.name }')\n<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">GuoweiHedeMacBook-Pro:tick-charts guowei.he$ helm install --name polling --namespace tick .\/telegraf-s\/\nNAME:   polling\nLAST DEPLOYED: Mon May 21 17:09:37 2018\nNAMESPACE: tick\nSTATUS: DEPLOYED\n\nRESOURCES:\n==&gt; v1\/ConfigMap\nNAME                DATA  AGE\npolling-telegraf-s  1     1s\n\n==&gt; v1\/Service\nNAME                TYPE       CLUSTER-IP    EXTERNAL-IP  PORT(S)   AGE\npolling-telegraf-s  ClusterIP  10.97.252.29  &lt;none&gt;       8125\/UDP  1s\n\n==&gt; v1beta1\/Deployment\nNAME                DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE\npolling-telegraf-s  1        0        0           0          1s\n\n==&gt; v1\/Pod(related)\nNAME                                 READY  STATUS   RESTARTS  AGE\npolling-telegraf-s-84cf9b648f-hs2td  0\/1    Pending  0         0s\n\n\nNOTES:\nTo open a shell session in the container running Telegraf run the following:\n\n- kubectl exec -i -t --namespace tick $(kubectl get pods --namespace tick -l app=polling-telegraf-s -o jsonpath='{.items[0].metadata.name}') \/bin\/sh\n\nTo tail the logs for a Telegraf pod run the following:\n\n- kubectl logs -f --namespace tick $(kubectl get pods --namespace tick -l app=polling-telegraf-s -o jsonpath='{ .items[0].metadata.name }')\n<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">GuoweiHedeMacBook-Pro:tick-charts guowei.he$ helm install --name hosts --namespace tick .\/telegraf-ds\/\nNAME:   hosts\nLAST DEPLOYED: Mon May 21 17:10:36 2018\nNAMESPACE: tick\nSTATUS: DEPLOYED\n\nRESOURCES:\n==&gt; v1beta1\/DaemonSet\nNAME               DESIRED  CURRENT  READY  UP-TO-DATE  AVAILABLE  NODE SELECTOR  AGE\nhosts-telegraf-ds  0        0        0      0           0          &lt;none&gt;         0s\n\n==&gt; v1\/ConfigMap\nNAME               DATA  AGE\nhosts-telegraf-ds  1     0s\n\n\nNOTES:\n\nTo open a shell session in the container running Telegraf run the following:\n\n- kubectl exec -i -t --namespace tick $(kubectl get pods --namespace tick -l app=hosts-telegraf-ds -o jsonpath='{.items[0].metadata.name}') \/bin\/sh\n\nTo tail the logs for a Telegraf pod in the Daemonset run the following:\n\n- kubectl logs -f --namespace tick $(kubectl get pods --namespace tick -l app=hosts-telegraf-ds -o jsonpath='{ .items[0].metadata.name }')\n\nTo list the running Telegraf instances run the following:\n\n- kubectl get pods --namespace tick -l app=hosts-telegraf-ds -w\n<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">GuoweiHedeMacBook-Pro:tick-charts guowei.he$ helm install --name alerts --namespace tick .\/kapacitor\/\nNAME:   alerts\nLAST DEPLOYED: Mon May 21 17:11:14 2018\nNAMESPACE: tick\nSTATUS: DEPLOYED\n\nRESOURCES:\n==&gt; v1\/ConfigMap\nNAME              DATA  AGE\nalerts-kapacitor  1     1s\n\n==&gt; v1\/Service\nNAME              TYPE       CLUSTER-IP      EXTERNAL-IP  PORT(S)   AGE\nalerts-kapacitor  ClusterIP  10.111.121.190  &lt;none&gt;       9092\/TCP  1s\n\n==&gt; v1beta1\/Deployment\nNAME              DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE\nalerts-kapacitor  1        0        0           0          1s\n\n==&gt; v1\/Pod(related)\nNAME                               READY  STATUS   RESTARTS  AGE\nalerts-kapacitor-5958df56d4-6f8wq  0\/1    Pending  0         1s\n\n\nNOTES:\n\nKapacitor can be accessed via port 9092 on the following DNS name from within your cluster:\n\n- http:\/\/alerts-kapacitor.tick:9092\n\nYou can easily connect to the remote instance from a local kapacitor cli. Forward the api port to localhost:9092\n\n- kubectl port-forward --namespace tick $(kubectl get pods --namespace tick -l app=alerts-kapacitor -o jsonpath='{ .items[0].metadata.name }') 9092:9092\n\nYou can also connect to the container running Kapacitor. To open a shell session in the pod run the following:\n\n- kubectl exec -i -t --namespace tick $(kubectl get pods --namespace tick -l app=alerts-kapacitor -o jsonpath='{.items[0].metadata.name}') \/bin\/sh\n\nTo tail the logs for the Kapacitor pod run the following:\n\n- kubectl logs -f --namespace tick $(kubectl get pods --namespace tick -l app=alerts-kapacitor -o jsonpath='{ .items[0].metadata.name }')\n<\/code><\/pre>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">uoweiHedeMacBook-Pro:tick-charts guowei.he$ helm install --name dash --namespace tick .\/chronograf\/\nNAME:   dash\nLAST DEPLOYED: Mon May 21 17:11:45 2018\nNAMESPACE: tick\nSTATUS: DEPLOYED\n\nRESOURCES:\n==&gt; v1\/Pod(related)\nNAME                              READY  STATUS   RESTARTS  AGE\ndash-chronograf-7c79fc5dd4-ldgwc  0\/1    Pending  0         0s\n\n==&gt; v1\/Service\nNAME             TYPE       CLUSTER-IP      EXTERNAL-IP  PORT(S)  AGE\ndash-chronograf  ClusterIP  10.109.251.124  &lt;none&gt;       80\/TCP   0s\n\n==&gt; v1beta1\/Deployment\nNAME             DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE\ndash-chronograf  1        0        0           0          0s\n\n\nNOTES:\nChronograf can be accessed via port 80 on the following DNS name from within your cluster:\n\n- http:\/\/dash-chronograf.tick\n\nYou can easily connect to the remote instance from your browser. Forward the webserver port to localhost:8888\n\n- kubectl port-forward --namespace tick $(kubectl get pods --namespace tick -l app=dash-chronograf -o jsonpath='{ .items[0].metadata.name }') 8888\n\nYou can also connect to the container running Chronograf. To open a shell session in the pod run the following:\n\n- kubectl exec -i -t --namespace tick $(kubectl get pods --namespace tick -l app=dash-chronograf -o jsonpath='{.items[0].metadata.name}') \/bin\/sh\n\nTo trail the logs for the Chronograf pod run the following:\n\n- kubectl logs -f --namespace tick $(kubectl get pods --namespace tick -l app=dash-chronograf -o jsonpath='{ .items[0].metadata.name }')\n<\/code><\/pre>\n<h4>\u663e\u793aIP<\/h4>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">kubectl get svc -w --namespace tick -l app=dash-chronograf\nNAME              TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE\ndash-chronograf   ClusterIP   10.109.251.124   &lt;none&gt;        80\/TCP    3m\n<\/code><\/pre>\n<h4>\u8fd0\u884c\u7aef\u53e3\u6620\u5c04,\u6253\u5f00\u6d4f\u89c8\u5668<\/h4>\n<pre class=\"line-numbers prism-highlight\" data-start=\"1\"><code class=\"language-sh\">kubectl port-forward --namespace tick $(kubectl get pods --namespace tick -l app=dash-chronograf -o jsonpath='{ .items[0].metadata.name }') 8888\nopen http:\/\/localhost:8888\n<\/code><\/pre>\n<h4>\u8bbe\u7f6einfluxdb\u94fe\u63a5\u4fe1\u606f<\/h4>\n<ul>\n<li>Connection string: http:\/\/data-influxdb.tick:8086<\/li>\n<li>Name: Influx 1<\/li>\n<li>Username: telegraf<\/li>\n<li>Password: telegraf<\/li>\n<li>Telegraf database: telegraf<\/li>\n<\/ul>\n<h4>\u5982\u56fe\u6240\u793a<\/h4>\n<p><img decoding=\"async\" src=\"http:\/\/www.heoffice.com\/wp-content\/uploads\/2018\/05\/tick-chart-chronograf-connection-300x176.png\" alt=\"\" \/><\/p>\n<h4>\u8bbe\u7f6eKapacitor<\/h4>\n<p><img decoding=\"async\" src=\"http:\/\/www.heoffice.com\/wp-content\/uploads\/2018\/05\/tick-chart-chronograf-connection-300x176.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003 https:\/\/github.com\/influxdata\/tick-charts Step 1: In&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[23],"tags":[24,25,26],"class_list":["post-165","post","type-post","status-publish","format-standard","hentry","category-kubernetes","tag-k8s","tag-kubernete","tag-tick-charts"],"acf":[],"_links":{"self":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=165"}],"version-history":[{"count":7,"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":174,"href":"https:\/\/heoffice.com\/index.php?rest_route=\/wp\/v2\/posts\/165\/revisions\/174"}],"wp:attachment":[{"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heoffice.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}