In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use Rancher elegantly in China. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Rancher has been in China for 4 years and completed its localization and localization in February this year. As an open source enterprise Kubernetes management platform, we have been paying close attention to the demands of Rancher community users. In our technology community, we often receive complaints about slow downloading from Github, time-consuming pulling images, inability to use library and system-library, and so on. These greatly reduce the Rancher experience of domestic users.
Ksd@Hailong-MacBook-Pro / tmp wget https://github.com/rancher/rke/releases/download/v1.0.8/rke_linux-amd64--2020-05-07 10 20 30 muri-https://github.com/rancher/rke/releases/download/v1.0.8/rke_linux-amd64Resolving github.com... 13.250.177.223Connecting to github.com | 13.250.177.223 |: 443. Connected.HTTP request sent, awaiting response... 302 FoundLocation: https://github-production-release-asset-2e65be.s3.amazonaws.com/108337180/26415380-8ebd-11ea-834a-af693358e976?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200507%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200507T022031Z&X-Amz-Expires=300&X-Amz-Signature=f4659696f17f619d1d42bfc0a78d998c12c34506475983eb523f150a22a4ce51&X-Amz-SignedHeaders=host&actor_id=0&repo_id=108337180&response-content-disposition=attachment%3B%20filename%3Drke_linux-amd64&response-content-type=application%2Foctet -stream [following]-- 2020-05-07 10 following 20 following-https://github-production-release-asset-2e65be.s3.amazonaws.com/108337180/26415380-8ebd-11ea-834a-af693358e976?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200507%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200507T022031Z&X-Amz-Expires=300&X-Amz-Signature=f4659696f17f619d1d42bfc0a78d998c12c34506475983eb523f150a22a4ce51&X-Amz-SignedHeaders=host&actor_id=0&repo_id=108337180&response-content-disposition=attachment% 3B%20filename%3Drke_linux-amd64&response-content-type=application%2Foctet-streamResolving github-production-release-asset-2e65be.s3.amazonaws.com... 52.216.65.240Connecting to github-production-release-asset-2e65be.s3.amazonaws.com | 52.216.65.240 |: 443. Failed: Operation timed out.Retrying.
Unable to download Rancher resources from Github
It is slow to pull the image, and it takes a long time for the cluster to start.
2020-05-07 03:06:27 [INFO] Pulling image [rancher/rke-tools:v0.1.56] on host [172.17.206.119], try # 12020/05/07 03:09:16 [INFO] Pulling image [rancher/hyperkube:v1.17.5-rancher1] on host [172.17.206.119], try # 12020/05/07 03:09:16 [INFO] cluster [c-zfz4g] provisioning: Pre-pulling kubernetes images
Timeout often occurs when pulling rancher images.
Unable to use library and system-library, resulting in the inability to use the app store
2020-05-07 03:31:31 [ERROR] CatalogController helm3-library [catalog] failed with: Remote commit check failed: Repo [https://git.rancher.io/helm3-charts] is not accessible: Get https://git.rancher.io/repos/helm3-charts/commits/master: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 2020-05-07 03:31:33 [ERROR] CatalogController library [catalog] failed with: Remote commit check failed: Repo [https://git.rancher. Io/charts] is not accessible: Get https://git.rancher.io/repos/charts/commits/master: net/http: request canceled (Client.Timeout exceeded while awaiting headers) 03:31:34 on 2020-05-07 [ERROR] CatalogController system-library [catalog] failed with: Remote commit check failed: Repo [https://git.rancher.io/system-charts] is not accessible: Get https://git.rancher.io/repos/system-charts/commits/release-v2.4: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Rancher/rancher log, showing some error logs about git.rancher.io timeout
In order to improve everyone's experience, we have proposed solutions to the above problems.
Use Rancher gracefully
In order to make people use Rancher more smoothly, we have sent some resources mirror to China and provided them to domestic users. Next, we will describe in detail how to use these resources.
Download Rancher components using domestic resources
We have put the common components of Rancher on the domestic server, visit this link, you can download the required components, and bid farewell to failed: Operation timed out
Use Ali Cloud Image Warehouse to build Rancher
We have synchronized an original image in the Aliyun image repository. The repository address: registry.cn-hangzhou.aliyuncs.com
Note: rancher images in Ali Cloud Image Repository do not support the use of tags such as latest, stable, etc. You must specify a version number, such as v2.4.2
Next, let's take a look at how demo works:
1. Use the Rancher image of Ali Cloud Image Repository to start Rancher.
Docker run-itd-p 80:80-p 443 443 restart=unless-stopped\-e CATTLE_AGENT_IMAGE= "registry.cn-hangzhou.aliyuncs.com/rancher/rancher-agent:v2.4.2"\ registry.cn-hangzhou.aliyuncs.com/rancher/rancher:v2.4.2
CATTLE_AGENT_IMAGE: specifies the image name of the rancher-agent
2. Set the default image warehouse
Navigate from UI to Settings, then edit system-default-registry,Value set to registry.cn-hangzhou.aliyuncs.com
For the parameters of system-default-registry, please refer to the official documentation.
Next, we add a custom cluster according to the official documentation, just wait for the cluster to start successfully. The following figure shows all the workload in system-project. These workload use the images in Aliyun's image repository registry.cn-hangzhou.aliyuncs.com:
It takes only 3-5 minutes to complete the construction of the whole cluster, which will greatly save time and improve work efficiency.
Use Code Cloud instead of Github
By default, Rancher uses repo on Github as the URL of the App Store. In the case of timeout, you can replace Catalog URL with the address of Cloud.
The corresponding relationship for each repo is as follows:
(click the link at the beginning of the article to get a replicable version)
So how do you modify Catalog URL?
Navigate to global or project-level Apps-> Manage Catalogs
Click the ellipsis on the right side of the list-> Edit
Just replace Catalog URL with the address in the cloud, and click Save
At this point, the status of the corresponding Catalog changes to Refreshed, and after it becomes Active, it can be used normally.
On how to use Rancher elegantly in the country to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.