Kubernetes

Kubernetes ประกาศให้การซัพพอร์ต Docker __ในฐานะการเป็นคอนเทนเนอร์รันไทม์__เข้าสู่สถานะ deprecated อย่างเป็นทางการใน Kubernetes 1.20 และเตรียมถอดฟีเจอร์นี้ออกในอนาคต

โครงการ Kubernetes ระบุว่า ตัว kubelet ที่เป็นตัวติดต่อกับคอนเทนเนอร์รันไทม์ จะติดต่อผ่าน CRI (Container Runtime Interface) แต่ในกรณีของ Docker นั้น ทางโครงการเลือกใช้ dockershim โมดูลที่อิมพลีเมนต์ CRI ให้ Docker เพื่อเป็นตัวติดต่อระหว่าง Docker และ Kubernetes มาอย่างยาวนาน แต่ช่วงหลังโครงการพบประเด็นหลายอย่างกับ dockershim ทำให้ตัดสินใจว่าจะให้ระบบซัพพอร์ต Docker เข้าสู่สถานะ deprecated และเตรียมถอดออกจาก Kubernetes ในอนาคต

นอกจากนี้ architecture ของ dockershim ค่อนข้างแตกต่างกับ CRI ตัวอื่น คือ dockershim จะติดกับตัว kubelet ในขณะที่ CRI อื่น ๆ จะใช้วิธีรันโปรเซสแยกแล้วติดต่อกันผ่าน GRPC

สำหรับผู้ที่ใช้งาน Docker เป็นคอนเทนเนอร์รันไทม์สำหรับ Kubernetes อยู่ ทางโครงการแนะนำให้ย้ายคอนเทนเนอร์รันไทม์ไปใช้ตัวที่รองรับ CRI เต็มรูปแบบ อย่างเช่น containerd หรือ CRI-O เป็นต้น

ที่มา - Kubernetes Change Log, Kubernetes GitHub Issue


ภาพจาก[ข่าวเก่า](https://www.blognone.com/node/116064)

Hiring! บริษัทที่น่าสนใจ

Carmen Software company cover
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd. company cover
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime company cover
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group company cover
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies company cover
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand company cover
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software company cover
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE company cover
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud company cover
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise company cover
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank company cover
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank company cover
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.) company cover
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd. company cover
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group company cover
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited company cover
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd. company cover
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV company cover
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB company cover
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd. company cover
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH company cover
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks company cover
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd. company cover
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech company cover
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd company cover
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand company cover
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai company cover
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand

เพื่อขยายความนะครับ
docker ในที่นี้ให้มองว่าเป็นชุดของคำสั่ง ข้างในจะเข้าไปเรียกใช้ containerd ที่เป็น runtime เพื่อจัดการ container แทน

ข่าวนี้หมายถึงว่า k8s จะถอด docker ออกจาก runtime ที่ k8s ออก แต่ไปใช้ผ่านทาง containerd แทน

ถามว่าจะใช้ docker อยู่มั้ย ในแง่ของ runtime จริงๆ คงไม่ต่างกันเพราะตัวที่ทำงานจริงๆ ยังเป็น containerd เหมือนเดิม แค่ว่าเปลี่ยนจากใช้ผ่าน docker-shim มาเป็น containerd โดยตรง

เพิ่มเติมจากคอมเมนต์คุณ wiennat นะครับ

ต้องบอกว่าการประกาศ deprecate อันนี้สร้างความแตกตื่นไม่น้อยทีเดียว (ตัวผมเองด้วย) แต่จริงๆ แล้วมันไม่ได้กระทบกับ developer และ end users ของ K8s เยอะขนาดนั้นครับ

คำว่า Docker ที่ K8s จะถอดออกนั้นหมายถึงตัว runtime ที่ทำงานอยู่ภายใน K8s cluster อีกที ทำหน้าที่ "รัน" container ที่เรา deploy เข้าไป ซึ่งปกติคือ "Docker container" นั่นเอง

แปลว่า "Docker container" ที่เราๆ ใช้กันนั้นยังทำงานได้เหมือนเดิม ยัง build ด้วยคำสั่ง docker build เหมือนเดิม เขียน Dockerfile เหมือนเดิมครับ

และอย่างที่ข่าวเขียนไว้ว่าต้นเหตุของการเปลี่ยนแปลงครั้งนี้คือ Dockershim ที่ทำหน้าที่เป็นตัวกลางระหว่าง K8s cluster กับ Docker stack เพราะ K8s ต้องเข้าไปคุยกับ containerd runtime (ที่อยู่ใน Docker stack อีกที) ผ่าน Dockershim ซึ่ง shim เนี่ยมีปัญหาเยอะ รวมถึงเพิ่ม hop การติดต่อด้วย

ทีมงาน K8s เลยตัดสินใจเลิกใช้ Docker runtime แล้วให้ K8s cluster/kubelet คุยกับ containerd ตรงๆ ผ่าน CRI (Container Runtime Interface) ผลคือ container/pod จะ start เร็วขึ้นและกิน CPU/memory น้อยลง

ทั้งนี้ ถ้า Docker runtime มันรองรับ CRI ตั้งแต่แรก เราก็จะไม่มีประเด็นนี้เลย

นอกจากนี้หากเราใช้ DIND (Docker in Docker) อันนี้ต้องเปลี่ยนไปใช้อย่างอื่น เพราะจะใช้ไม่ได้แล้วครับ

สุดท้าย ใน K8s เวอร์ชัน 1.20 ทุกอย่างจะยังทำงานเหมือนเดิม เพียงแต่จะมีข้อความเตือนว่า Docker runtime จะถูกถอดออกในอนาคต ซึ่งแพลนตอนนี้คือในเวอร์ชัน 1.23 ช่วงกลางถึงปลายปี 2021 แปลว่ามีเวลาให้เตรียมตัวทดสอบ workload ของเราๆ กันอีกเกือบปี (หรือนานกว่านั้นถ้าเลื่อนการ deprecate ออกไป แต่จะไม่เร็วกว่าเวอร์ชัน 1.23 แน่ๆ)

ข้อมูลเพิ่มเติมดูได้ที่

และมี docs ของ Azure เขียนอธิบายเรื่อง containerd/dockershim ไว้ค่อนข้างดี รวมถึงบอกเรื่องความแตกต่างและข้อจำกัดต่างๆ ไว้ด้วยครับ >> Container runtime configuration

หากผมเข้าใจตรงไหนผิดไป ท่านอื่นแก้ได้เลยนะครับ