In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Using K3s to reduce the cost of K8s, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
The data crawler and data server resources in the backstage of Flying Dog are deployed on K8s and built using rancher. Try to choose the lowest-configured machine without affecting too much performance. Use swap files instead of (swap) when running out of memory. The general structure of the whole cluster is as follows:
Purpose Machine Type Price Crawler 11G 1CPU5 $21G 1CPU5 $31g 1CPU5 $Monitoring 1G 1CPU5 $etcd2G 1CPU10 $rancher mainframe 2G 1CPU10 $aiflygo Server 4G 2CPU20
The cost is about $60 a month. By analyzing the above cluster, we can find that the rancher and etcd nodes are a waste of money, with an expense of $20 a month. DigitalOcean provides a managed cluster of K8s, which can save this overhead. However, the droplet of the managed cluster cannot be customized, and swap partitions and bbr cannot be used, causing performance bottlenecks. In addition, the minimum requirement for hosted droplet is 2 gigabytes of memory, resulting in unnecessary expenses.
K8s has a very bad place is that the lowest machine requirements are relatively high, 1 GB of memory worker node has been completely lower than the recommended configuration, if you deploy worker node on the above direct memory occupation of about 300m, the remaining memory space is not much, you must use swap partitions. Etcd nodes have used 1 gigabyte of memory before, but performance problems are often caused by heavy use of swap partitions, resulting in cluster crashes, so you need to use 2 gigabytes of memory anyway.
Recently, rancher launched K3s, which focuses on easy deployment and machine consumption in the polar regions. This is very important for cost savings. I tried the next K3s server only takes up about 200m of memory, agent only takes up tens of megabytes of memory, which is very economical. K3s can also be managed entirely using kubectl, and the configuration file is consistent with K8s, which is very convenient.
I removed the etcd node and the rancher host and replaced it with a 1G 1CPU machine ($5), saving $15, and then downconfiguring the aiflygo server to 2G 2CPU ($15), resulting in a total savings of $20. Thanks to more available memory, the performance of the crawler is better than before, and the performance of the overall cluster is also very high.
As for HA, since it is poor enough to use K3s to reduce overhead, it is not necessary to consider a small cluster like mine and a non-critical system.
This is the answer to the sample analysis question about using K3s to reduce the cost of K8s. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.