Install K8s cluster with 3 ubuntu nodes

Install k8s cluster with 3 ubuntu nodes

Background

Recently I encountered a computation issue where there is no enough amount of memory to process 100GB of data in memory with pandas. So I think if I can speed up computation with dask on top of k8s cluster. So then I follow k8s installation tutorial to set up 3 nodes k8s cluster. I write down this k8s installation process to help people encoutering GFW issue during k8s installtion.

Follow this doc to install k8s.

Things to pay attention to if you are in China and deals with GFW.

  1. http_proxy and https_proxy Please unset your http_proxy and https_proxy environtment vairable with following command in bash so that kubectl command can works as expected. Becuse kubectl calls curl to get information from master nodes and curl will go through proxy if if find http_proxy no empty.
    unset http_proxy
    unset https_proxy
    unset HTTP_PROXY
    unset HTTPS_PROXY
    
  2. image_repository in kubeadm kubeadm needs to pull image from k8s repo which might be blocked because of GFW. You can set image_repository option to pull image from aliyun in kubeadm init command
    sudo kubeadm init --kubernetes-version v1.28.2 \
    --cri-socket=unix:///run/containerd/containerd.sock \
    --apiserver-advertise-address=$(hostname -i) \
    --control-plane-endpoint=$(hostname -i) \
    --apiserver-cert-extra-sans=$(hostname -i) \
    --image-repository=registry.aliyuncs.com/google_containers
    
  3. containerd image image_repository What is containerd ? This is what bing chat says. Containerd is an industry-standard container runtime with an emphasis on simplicity, robustness, and portability¹². It is available as a daemon for Linux and Windows¹².

Here are some of its key features:

  • Manages the complete container lifecycle of its host system, from image transfer and storage to container execution and supervision to low-level storage to network attachments and beyond¹².
  • Supports OCI Image Spec and OCI Runtime Spec¹.
  • It is multi-tenant and OCI-compliant¹.

Please follow this doc to update containerd config in before you start containerd service.

https://www.cnblogs.com/wod-Y/p/17043985.html




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Learning-based memory allocation for C++ server workloads summary
  • my question:
  • Binary search algorithm variant
  • Docker Rocksdb build
  • Difference between Dockerfile and Docker Compose