我已经通过Mac上的Terminal安装了kubectl和kubectx。命令仅在终端中能正常工作。使用iTerm2,我遇到了连接问题。
端子:
kubectl get pods
NAME READY STATUS RESTARTS AGE
actionprocessor-568c869cc6-jtjwg 1/1 Running 0 16h
hbridge-5b4964fc68-bmcnw 1/1 Running 0 17h
k2m-75cb44b7dc-svtpr 1/1 Running 0 16h
m2k-7c8bb5f9-vsrld 1/1 Running 0 16h
iTerm:
kubectl get pods
Unable to connect to the server: dial tcp 35.*.*.123:443: connect: host is down
(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x106d13f98>: Failed to establish a new connection: [Errno 64] Host is down'))
我基本上可以从Terminal进行所有操作。但是从iTerm上,我什至无法使用gcloud
或az cli
连接到托管平台。一切都返回相同的连接错误。
终端ENV变量:
TERM_PROGRAM_VERSION=421.1
LANG=en_US.UTF-8
TERM_PROGRAM=Apple_Terminal
XPC_SERVICE_NAME=0
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.lk29tXgG6a/Listeners
TERM=xterm-256color
SHELL=/usr/local/bin/zsh
HOME=/Users/miguelcallejasp
LOGNAME=miguelcallejasp
USER=miguelcallejasp
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHLVL=1
PWD=/Users/miguelcallejasp
OLDPWD=/Users/miguelcallejasp
ZSH=/Users/miguelcallejasp/.oh-my-zsh
PAGER=less
LESS=-R
LC_CTYPE=en_US.UTF-8
iTerm2:
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.9xV8EAQUEb/Render
COLORFGBG=15;0
ITERM_PROFILE=TermOld
XPC_FLAGS=0x0
LANG=en_US.UTF-8
PWD=/Users/miguelcallejasp
SHELL=/usr/local/bin/zsh
TERM_PROGRAM_VERSION=3.2.7
TERM_PROGRAM=iTerm.app
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
COLORTERM=truecolor
TERM=xterm-256color
HOME=/Users/miguelcallejasp
USER=miguelcallejasp
XPC_SERVICE_NAME=0
LOGNAME=miguelcallejasp
__CF_USER_TEXT_ENCODING=0x0:0:0
SHLVL=1
OLDPWD=/Users/miguelcallejasp/Library
ZSH=/Users/miguelcallejasp/.oh-my-zsh
PAGER=less
LESS=-R
LC_CTYPE=en_US.UTF-8
_=/usr/bin/printenv