iT邦幫忙

2021 iThome 鐵人賽

DAY 1
0
DevOps

玩耍開源k8s30天系列 第 1

day1 : 介紹與期望

這是我人生第一次挑戰30天鐵人賽,在過去從來沒有寫過部落格的情況下,首次寫文章就貢獻給鐵人賽,我覺得真的非常的衝動,不過這就是挑戰啊!!

其實最我個人而言接觸container不到4年,接觸k8s不到2年,linux真正開始實戰也不到5年,以我這樣30幾歲的工程師老實說落後各個有才華的年輕人非常遠,不過我都可以開始了,我相信大家也能駕馭開源。

爲什麼題目是 開源k8s30天 呢?

“取之開源貢獻開源” 我希望這是貫穿我這30天的核心
我在這30天中會以k8s為基底,帶入各項開源專案來完整服務架構,讓有意願踏入k8s這個圈子的人有一些cncf專案可以參考並且未來也能將開源發散出去,不論是使用、分享、提出想法都是一種貢獻的方法,希望大家都能讓台灣的開源環境越來越壯大。

正文開始

如同一個前輩所言,一個kubernetes 永遠都有不同解釋,每個人講出來的都不會是一樣的,而我的觀點其實就是這是一替我自動化的管理服務的平台,在k8s上運行的可以是各種服務,但是不一定所有服務都適合運行到k8s上,如果你期望你有一個不能重啟的服務在k8s上能夠實現不重啟的概念,那麼這就會是一個不適合的案例。

接下來的30天,我會在gcp的平台上從0開始建置一套kubernetes環境,整個環境8成基於k8s的resources完全支援自動化佈署並且可以重現

https://ithelp.ithome.com.tw/upload/images/20210901/20139661Vp4AcyPQDw.png
綠色為vm 藍色為cluster 橘色為resources

我會透過terraform以及ansible兩套工具達成os以及k8s服務佈建,透過rancher這套管理工具管理k8s叢集並且佈署istio grafana、prometheus、istio、opa,在k8s上使用vector專案將log記錄到loki上,使用grafana以及grafana loki管理metrics和logging需求,利用grafana tempo管理tracing的監控。

佈建gitlab主機搭配argocd做出gitops環境,透過argo rollouts讓服務能夠漸進式佈署,並利用kong API讓服務能夠讓外部使用。

在內部佈署兩種streaming service,分別是nats + nats streming cluster以及透過strimzi佈署kafka cluster。

在內部佈署兩種DB service,分別是redisDB + keyDB以及TIDB。

在內部佈署jmeter cluster並透過influxDB進行數據搜集。

在內部佈署velero並使用minio進行namespaces備份。

透過knative做出serverless的服務。

利用opa機制限制服務佈署。

最後搭配kubernetes-monitor進行k8s安全監控。

附錄
有使用到的專案的官方網站(github),個人建議在學習或使用前先參考官方說明會是最精準的
cncf專案頁面
https://landscape.cncf.io/

kubernetes
https://kubernetes.io/
https://github.com/kubernetes/kubernetes

terraform
https://www.terraform.io/
https://github.com/hashicorp/terraform

ansible
https://www.ansible.com/
https://github.com/ansible/ansible

harbor
https://goharbor.io/
https://github.com/goharbor/harbor

haproxy
http://www.haproxy.org/
https://github.com/haproxy/haproxy

rancher
https://rancher.com/
https://github.com/rancher/rancher

prometheus
https://prometheus.io/
https://github.com/prometheus/prometheus

grafana
https://grafana.com/
https://github.com/grafana/grafana

vector
https://vector.dev/
https://github.com/timberio/vector

loki
https://grafana.com/oss/loki/
https://github.com/grafana/loki

tempo
https://grafana.com/oss/tempo/
https://github.com/grafana/tempo

istio
https://istio.io/
https://github.com/istio/istio

kong
https://konghq.com/
https://github.com/Kong/kong

gitlab
https://about.gitlab.com/
https://github.com/gitlabhq/gitlabhq

argo-cd
https://argoproj.github.io/argo-cd/
https://github.com/argoproj/argo-cd

argo-rollouts
https://argoproj.github.io/argo-rollouts/
https://github.com/argoproj/argo-rollouts

nats + nats streaming
https://nats.io/
https://github.com/nats-io/nats-server
https://github.com/nats-io/nats-streaming-server

strimzi
https://strimzi.io/
https://github.com/strimzi

kafka
https://kafka.apache.org/
https://github.com/apache/kafka

redis
https://redis.io/
https://github.com/redis/redis

keyDB
https://keydb.dev/
https://github.com/EQ-Alpha/KeyDB

TIDB
https://pingcap.com/
https://github.com/pingcap/tidb

Jmeter
https://jmeter.apache.org/
https://github.com/apache/jmeter

influxDB
https://www.influxdata.com/
https://github.com/influxdata/influxdb

wiremock
http://wiremock.org/
https://github.com/tomakehurst/wiremock

velero
https://velero.io/
https://github.com/vmware-tanzu/velero

minio
https://min.io/
https://github.com/minio/minio

opa
https://www.openpolicyagent.org/
https://github.com/open-policy-agent

kubernetes-monitor
https://snyk.io/
https://github.com/snyk/kubernetes-monitor


下一篇
day2 : k8s建置(上)
系列文
玩耍開源k8s30天31
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言