發表文章

目前顯示的是有「k8s」標籤的文章

使用Grafana 作為 Prometheus 的操作介面(一) 安裝篇

環境  - Ubuntu 16.04  - Kubernetes 1.6  - Prometheus 1.6  - Grafana 4.2.0  接續上篇,裝完Prometheus後,發現介面沒有這麼好使用,官方也推薦Grafana作為視覺化的介面,並且使用Grafana的alert/notification機制,所以繼續來安裝Grafana,一樣是透過Kubernetes做安裝,所以一樣會有一堆的yaml檔 首先建立一個Grafana的deployment grafana-deployment.yaml apiVersion :  extensions/v1beta1 kind :  Deployment metadata :    name :  grafana spec :    replicas :  1    template :      metadata :        labels :          name :  grafana          grafana :  "true"          role :  db      spec :        containers :         -  image : grafana/grafana:4.2.0         ...

透過 Kubernetes 安裝 Prometheus 跟 alert manager

環境  - Ubuntu 16.04  - Kubernetes 1.6  - Prometheus 1.6 前兩篇介紹完kubernetes的安裝,接下來,介紹一下monitor的工具 - Prometheus 嗯....其實沒有要介紹,是要直接講Prometheus中alert manager的安裝 先簡單說明一下,要怎麼安裝Prometheus 首先,準備兩個yaml檔,一個是起Prometheus container,一個是設定檔 prometheus-deployment.yaml apiVersion :  v1 kind :  Service metadata :    annotations :      prometheus.io/scrape :  'true'    labels :      name :  prometheus    name :  prometheus spec :    selector :      app :  prometheus    type :  NodePort    ports :   -  name :  prometheus      protocol :  TCP      port :  9090      nodePort :  30900 --- apiVersion :  extensions/v1beta1 kind :  Deployment metadata :    name :  prometh...

手動安裝Kubernetes(二)啟動服務

本文適合完全沒有基礎的新手,指令只要複製、貼上即可運作 環境:   - Ubuntu 16.04    - Kubernetes 1.6   - Docker 1.12.6 接續上文 再來就把binary複製到對應的目錄   cp  ~/kube-bin/* /opt/bin/   cp  ~/kube-bin/kubectl /usr/local/bin/   chmod  744 -R /opt/bin/   chmod  744 -R /usr/local/bin/        export  PATH= $PATH :/opt/bin 這是不分master, minions的懶人複製法 MASTER -------------------------------------------------------------------- - 建立憑證 (Master)   vim /srv/kubernetes/ openssl.conf 複製以下內容 [req] req_extensions  = v3_req distinguished_name  = req_distinguished_name [req_distinguished_name] [v3_req] # Extensions to add to a certificate request basicConstraints  = CA:FALSE keyUsage  = nonRepudiation, digitalSignature, keyEncipherment subjectAltName  = @alt_names #List...