MacOS 安装Rancher Desktop 体验k8s的方法

首先我们需要修改配置文件 vi ~/Library/Application\ Support/rancher-desktop/lima/_config/override.yml

配置好代理信息

env:
  http_proxy: http://127.0.0.1:8123/
  https_proxy: http://127.0.0.1:8123/

接下来我们开启一个命令行,然后设置代理信息。才能正常执行rancher desktop

export PROXY_PORT=8123
 export PROXY_IP=127.0.0.1
 export http_proxy=http://127.0.0.1:8123
 export HTTP_PROXY=http://127.0.0.1:8123
 export https_proxy=http://127.0.0.1:8123
 export HTTPS_PROXY=http://127.0.0.1:8123
export ftp_proxy=http://127.0.0.1:8123
 export FTP_PROXY=http://127.0.0.1:8123
 export rsync_proxy=http://127.0.0.1:8123
export RSYNC_PROXY=http://127.0.0.1:8123

执行命令 /Applications/Rancher\ Desktop.app/Contents/MacOS/Rancher\ Desktop

接下来就等rancher desktop 安装完毕

体验一下

nerdctl login
$ nerdctl run -it --rm alpine

docker.io/library/alpine:latest:                                                  resolved       |++++++++++++++++++++++++++++++++++++++|
index-sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad:    done           |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870: done           |++++++++++++++++++++++++++++++++++++++|
config-sha256:9c6f0724472873bb50a2ae67a9e7adcb57673a183cea8b06eb778dca859181b5:   done           |++++++++++++++++++++++++++++++++++++++|
layer-sha256:213ec9aee27d8be045c6a92b7eac22c9a64b44558193775a1a7f626352392b49:    done           |++++++++++++++++++++++++++++++++++++++|
elapsed: 9.6 s                                                                    total:  2.7 Mi (285.8 KiB/s)
/ #

分类: 默认 标签: 发布于: 2022-09-08 10:21:35, 点击数: