{"id":17911774,"url":"https://github.com/comradeprogrammer/wscbs","last_synced_at":"2025-04-03T06:44:09.181Z","repository":{"id":221240964,"uuid":"753828763","full_name":"ComradeProgrammer/WSCBS","owner":"ComradeProgrammer","description":"coderen voor het lab van de cursus \"Web Service and Cloud-Based Systems\" aan de Universiteit van Amsterdam","archived":false,"fork":false,"pushed_at":"2024-02-29T00:21:39.000Z","size":19499,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T20:31:11.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ComradeProgrammer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-06T21:36:50.000Z","updated_at":"2024-02-06T21:38:11.000Z","dependencies_parsed_at":"2024-02-29T01:29:22.610Z","dependency_job_id":null,"html_url":"https://github.com/ComradeProgrammer/WSCBS","commit_stats":null,"previous_names":["comradeprogrammer/wscbs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComradeProgrammer%2FWSCBS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComradeProgrammer%2FWSCBS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComradeProgrammer%2FWSCBS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComradeProgrammer%2FWSCBS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ComradeProgrammer","download_url":"https://codeload.github.com/ComradeProgrammer/WSCBS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952273,"owners_count":20859811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T19:40:18.747Z","updated_at":"2025-04-03T06:44:09.156Z","avatar_url":"https://github.com/ComradeProgrammer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 3.2 How to install the kubernetes 1.29 \n### Background\n\nUse this document if you don't want to downgrade to 1.24.\n\n\nThe original document was targeted on the kubernetes 1.20. However the latest k8s version is 1.29. In k8s 1.24, there was a major breaking change, which completely remove the docker support for k8s, as well as other major changes about cni plugin. That is the reason why the old document does not work.\n### Step 0: install the docker engine and containerd\n\n\n[reference link](https://docs.docker.com/engine/install/debian/)\n\n*This part needs to be done on EVERY MACHINE*\n\nThis part is basically the same with the original document. If you have finished this, you can skip it.\n\n```shell\n# Intall the depedency\nsudo apt-get update \u0026\u0026 sudo apt-get install ca-certificates curl gnupg lsb-release\n\n# Add Docker's official GPG key:\nsudo apt-get update\nsudo apt-get install ca-certificates curl\nsudo install -m 0755 -d /etc/apt/keyrings\nsudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc\nsudo chmod a+r /etc/apt/keyrings/docker.asc\n\n# Add the repository to Apt sources:\necho \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \\\n  $(. /etc/os-release \u0026\u0026 echo \"$VERSION_CODENAME\") stable\" | \\\n  sudo tee /etc/apt/sources.list.d/docker.list \u003e /dev/null\nsudo apt-get update\n```\n```shell\n# install\nsudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n\n# set up docker so that we don't need to use sudo to run it\nsudo systemctl enable docker\nsudo usermod -aG docker \"$USER\"\nexit\n```\n\n### Step1: configure the containerd for the kubernetes\n*This part needs to be done on EVERY MACHINE. If you skip this, your cluster will crash when installing calico*\n\n[reference link](https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd)\n\n\nOne of the breaking change introduced by k8s 1.24 was that the full removal of docker support.So we have to use the containerd for the kubernetes cluster. This step targets on the configuration of containerd\n\n\nFirst, generate a default config for containerd.\n```\ncontainerd config default \u003e config.toml\n```\nThen open this file, do the following thing;\n\n1. Find section `[plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc]`, then in the subsection  `[plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc.options]`, change `SystemdCgroup = true`. Basically your file should look like this.\n\n```\n[plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc]\n  ...\n  [plugins.\"io.containerd.grpc.v1.cri\".containerd.runtimes.runc.options]\n    SystemdCgroup = true \n```\n\n2. Make sure that cri is not included in the`disabled_plugins` list within `config.toml`\n\n3. use this config.toml to replace the original configuration file, and restart containerd\n```\nsudo mv config.toml /etc/containerd/config.toml\n\nsudo systemctl restart containerd\n```\n### Step2: install kubeadm 1.29\n*This part needs to be done on EVERY MACHINE. If you skip this, your cluster will crash when installing calico*\n\n[reference link](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)\n\nUpdate the apt package index and install packages needed to use the Kubernetes apt repository:\n```shell \nsudo apt-get update\n# apt-transport-https may be a dummy package; if so, you can skip that package\nsudo apt-get install -y apt-transport-https ca-certificates curl gpg\n```\n\nDownload the public signing key for the Kubernetes package repositories. The same signing key is used for all repositories so you can disregard the version in the URL. Then add source for apt.\n```shell\n# If the folder `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.\n# sudo mkdir -p -m 755 /etc/apt/keyrings\ncurl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg\n\n# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list\necho 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list\n```\n\nUpdate the apt package index, install kubelet, kubeadm and kubectl, and pin their version:\n```shell\nsudo apt-get update\nsudo apt-get install -y kubelet kubeadm kubectl\nsudo apt-mark hold kubelet kubeadm kubectl\n```\n\n### Step 3: start the master node of kubernetes\n*This part needs to be done ONLY ON MASTER NODE*\n\n[reference link](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/)\n\n```shell\nsudo kubeadm init --pod-network-cidr=192.168.0.0/16\n\n# setup kubectl\nmkdir -p $HOME/.kube\nsudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config\nsudo chown $(id -u):$(id -g) $HOME/.kube/config\n\n```\nYou will also see something like this in the output\n```shell\nYou should now deploy a pod network to the cluster.\nRun \"kubectl apply -f [podnetwork].yaml\" with one of the options listed at:\n  https://kubernetes.io/docs/concepts/cluster-administration/addons/\n\nThen you can join any number of worker nodes by running the following on each as root:\n\nkubeadm join 145.100.135.151:6443 --token xxxxxxxxxxxxxxxxxx \\\n\t--discovery-token-ca-cert-hash sha256:xxxxxxxxxxxxxxxxxxxxx\n\n```\n\nKeep This! You will need this command later!\n\nNow execute `kubectl get ns` you should see something like this\n```\nNAME              STATUS   AGE\ndefault           Active   3h17m\nkube-node-lease   Active   3h17m\nkube-public       Active   3h17m\nkube-system       Active   3h17m\n```\n\n### Step 4: prerequisite configuration for Calico\n*This part needs to be done on EVERY MACHINE, AND IT IS VITAL. If you skip this, control plane of your cluster will crash when installing calico*\n\n[reference link](https://docs.tigera.io/calico/latest/operations/troubleshoot/troubleshooting#configure-networkmanager)\n\nCreate the following configuration file at `/etc/NetworkManager/conf.d/calico.conf` to prevent NetworkManager from interfering with the interfaces:\n\n```\n[keyfile]\nunmanaged-devices=interface-name:cali*;interface-name:tunl*;interface-name:vxlan.calico;interface-name:vxlan-v6.calico;interface-name:wireguard.cali;interface-name:wg-v6.cali\n```\n\n### Step 5. install newest Calico, the CNI plugin\n*This part needs to be done ONLY ON MASTER NODE*\n\n[reference link](https://docs.tigera.io/calico/latest/getting-started/kubernetes/self-managed-onprem/onpremises)\n\n```\ncurl https://raw.githubusercontent.com/projectcalico/calico/v3.27.2/manifests/calico.yaml -O\nkubectl apply -f calico.yaml\n```\n\nWait until the master node is ready. When master node is ready, you should see something like this when executing `kubectl get nodes`\n\n```\nNAME            STATUS   ROLES           AGE     VERSION\nkubeclass-151   Ready    control-plane   3h23m   v1.29.2\n```\n\n### Step6: start the worker node.\n*This part needs to be done ONLY ON WORKER NODE*\n\nExecute the command you saw in Step 3, when executing `kubeadm init`\n```\nkubeadm join 145.100.135.xxx:6443 --token xxxxxxxxxxxxxxxxxx \\\n\t--discovery-token-ca-cert-hash sha256:xxxxxxxxxxxxxxxxxxxxx\n```\n\nThe wait until all the worker nodes are ready. When they are ready, you should see something like this when executing `kubectl get nodes`\n\n```\nNAME            STATUS   ROLES           AGE     VERSION\nkubeclass-151   Ready    control-plane   3h23m   v1.29.2\nkubeclass-186   Ready    \u003cnone\u003e          3h20m   v1.29.2\nkubeclass-187   Ready    \u003cnone\u003e          3h20m   v1.29.2\n```\n\nCongratulations! You have got a real production-level k8s cluster installed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomradeprogrammer%2Fwscbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomradeprogrammer%2Fwscbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomradeprogrammer%2Fwscbs/lists"}