In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
k3s is an open source, lightweight Kubernetes distribution released earlier this year by Rancher Labs, perfect for running Kubernetes in resource-constrained environments. Due to its lightweight nature, it is ideal for developers to explore and experiment on laptops. But the native k3s works better on Linux, so how do we run it on Mac?
We need a tool-Multipass. It provides a command line interface that allows users to coordinate the creation, management, and maintenance of Ubuntu Linux virtual machines to simplify application development and can be used on mac.
First we install Multipass using brew, a package management tool.
brew search multipassbrew cask install multipass
Now use Multipass to create a VM: requires 1GB of memory and 5GB of disk
multipass launch --name k3s --mem 1G --disk 5GLaunched: k3s
Wait for the VM to be created, then start a shell for the VM
multipass shell k3s
Then run curl -sfL https://get.k3s.io|sh -to install k3s
[INFO] Finding latest release[INFO] Using v0.2.0 as release[INFO] Downloading hash https://github.com/rancher/k3s/releases/download/v0.2.0/sha256sum-amd64.txt[INFO] Downloading binary https://github.com/rancher/k3s/releases/download/v0.2.0/k3s[INFO] Verifying binary download[INFO] Installing k3s to /usr/local/bin/k3s[INFO] Creating /usr/local/bin/kubectl symlink to k3s[INFO] Creating /usr/local/bin/crictl symlink to k3s[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh[INFO] systemd: Creating environment file /etc/systemd/system/k3s.service.env[INFO] systemd: Creating service file /etc/systemd/system/k3s.service[INFO] systemd: Enabling k3s unitCreated symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service. [INFO] systemd: Starting k3s
After installing k3s, run it on mac and verify it with kubectl.
multipass@k3s:~$ kubectl get nodesNAME STATUS ROLES AGE VERSIONk3s Ready 7m14s v1.13.4-k3s.1multipass@k3s:~$ kubectl get pods --all-namespacesNAMESPACE NAME READY STATUS RESTARTS AGEkube-system coredns-7748f7f6df-dnsp2 1/1 Running 0 7m15skube-system helm-install-traefik-nqvg8 0/1 Completed 0 7m15skube-system svclb-traefik-6659944cc7-f6rdc 2/2 Running 0 6m53skube-system traefik-5cc8776646-99c66 1/1 Running 0 6m53s
It's done! Now we can run k3s on mac. The next article will build on this article and deploy Jenkins Helm chart on k3s, stay tuned yo!
If you still want to know more about the use of k3s skills, welcome to attend the k3s offline workshop held in Shenzhen on October 26, Rancher Labs senior architect will introduce the functions, features and use scenarios of k3s for you in detail, and conduct live demo, and will also take you to build k3s clusters with your own notebook. Click here to sign up!
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.