Skip to main content

K8S-101 - Các khái niệm trong Kubernetes

Kubernetes là gì?

Kubernetes là một nền tảng mã nguồn mở giúp tự động triển khai, scale và vận hành các ứng dụng container trên cụm các host, cung cấp cơ sở hạ tầng tập trung container
Với kubernetes ta có thể giải quyết các nhu cầu của khác hàng nhanh chóng và rất hiệu quả
  • Deploy ứng dụng nhanh
  • Scale ứng dụng mà không ảnh hưởng tới các thành phần khác
  • Liên tục có những tính năng mới
  • Tối ưu việc sử dụng tài nguyên

Các khái niệm

Cluster
Một cluster là một tập các máy vật lý hay máy ảo hoặc những tài nguyên cơ sở hạ tầng khác được sử dụng bởi Kubernetes để chạy các ứng dụng
Node
Một node là một máy ảo hoặc máy vật lý chạy Kubernetes, nơi mà các pod có thể được schedule tới đó.
Pod
Một pod là một nhóm các container và volume có liên quan tới nhau
Label
Một label là một cặp key/value gắn với một tài nguyên (resource) như một pod, để truyền tải các thuộc tính mà người dùng định nghĩa ra. Các label có thể được sử dụng để tổ chức và lựa chọn các tập con của nhiều resource khác nhau.
Selector
Một Selector là một biểu thức mà phù hợp với label để xác định các resource liên quan. Ví dụ: Những pod nào là backend của một load balancer
Replication Controller
Một replication controller đảm bảo rằng số lượng các pod replicas đã định nghĩa luôn luôn chạy tại bất kì thời điểm nào. Nhiệm vụ là xử lý việc tạo lại những pod này khi máy chủ đó bị reboot hoặc lỗi.
Service
Một service định nghĩa một tập các pod và cách để truy cập vào chúng, ví dụ như một địa chỉ IP hoặc 1 tên miền
Volume
Một volume đơn giản là một thư mục, có thể có dữ liệu bên trong, nó được truy cập bởi một container.
Secret
Một secret chứa dữ liệu nhạy cảm, như token. Nó sẽ nằm bên trong container khi có yêu cầu.
Name
Tên của resource
Namespace
Một namespace như một prefix cho tên của một resource. Namespace giúp cô lập các project, team hay các khách hàng trên cùng 1 cluster với nhau. Namespace cũng tránh việc trùng lặp tên giữa các team.
Annotation
Một cặp key/value - có thể lưu giữ lượng dữ liệu lớn hơn (khi so sánh với label) và có thể người dùng không đọc hiểu được dữ liệu đó.

Comments

Popular posts from this blog

Zabbix, AWS and Auto Registration

One of the things I love the most with AWS is  auto-scaling . You choose an AMI, set some parameters and AWS will spin instances up and down whenever a threshold is breached. But with all these instances spinning up and down there are some unknowns. For example, what is the IP address of the new instance? Its host name? This can be critical when other components of your infrastructure are dependent on knowing these parameters. I had this problem when I started to use  Zabbix  as the monitoring system. At first it seemed like a complicated one, but Zabbix has a wonderful feature called  Auto Registration  which can be used exactly for this situation. I will try to show how to configure auto registration both on the client (EC2 instance running Ubuntu 14.04) and on the Zabbix server (Zabbix Server 2.4.2). Zabbix-agent Installation and Configuration Let’s start with installing zabbix-agent on the Ubuntu client: 1 2 $ sudo apt-get update $ sud...

Scaling Kubernetes to 2,500 Nodes

We’ve been running  Kubernetes  for deep learning research for over two years. While our largest-scale workloads manage bare cloud VMs directly, Kubernetes provides a fast iteration cycle, reasonable scalability, and a lack of boilerplate which makes it ideal for most of our experiments. We now operate several Kubernetes clusters (some in the cloud and some on physical hardware), the largest of which we’ve pushed to over 2,500 nodes. This cluster runs in Azure on a combination of D15v2 and NC24 VMs. On the path to this scale, many system components caused breakages, including etcd, the Kube masters, Docker image pulls, network, KubeDNS, and even our machines’ ARP caches. We felt it’d be helpful to share the specific issues we ran into, and how we solved them. etcd After passing 500 nodes in our cluster, our researchers started reporting regular timeouts from the  kubectl  command line tool. We tried adding more Kube masters (VMs running  kube-apiserv...

CTI with Node + Redis

Summary In this article I'll be discussing a way to implement call data passing between disparate telephony systems, i.e., Computer Telephony Integration (CTI).  The techniques I employ in this article ( DNIS pooling, database storage of call data, etc) are nothing groundbreaking.  In fact, these techniques are as old as the hills (well, maybe not that old).  What will be new here is the use of current software architectures such as REST  with highly-efficient run-time environments such as Node.js and Redis  to realize an open data integration between 3rd party systems. This article is the culmination of a series I've written on this topic.  In Part 1,  REST calls from Genesys Routing Strategies , I discussed how to make REST web service calls from one particular vendor's CTI system ( Genesys ).  In Part 2, VXML and REST Web Services , I discussed REST web service execution from VXML applications. I'll be leveraging informa...