美文网首页
mac链接K8S

mac链接K8S

作者: 小小的小帅 | 来源:发表于2022-02-23 18:04 被阅读0次

    参考:https://www.jianshu.com/p/81087da4cbdc
    1.安装brew

    /bin/zsh -c "$([curl](https://so.csdn.net/so/search?q=curl&spm=1001.2101.3001.7020) -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
    

    选择1
    2.安装sshuttle
    brew install sshuttle
    可能涉及:

    xcode-select --install
    

    3.下载并安装KT(以x86 64位版本为例)

    $ curl -OL https://github.com/alibaba/kt-connect/releases/download/v0.3.0/ktctl_0.3.0_MacOS_x86_64.tar.gz
    $ tar zxf ktctl_0.3.0_MacOS_x86_64.tar.gz
    $ mv ktctl /usr/local/bin/ktctl
    $ ktctl help
    

    4.安装:kubectl命令
    brew install kubernetes-cli
    5.将如下config文件拷贝到/.kube/config,该文件是项目dev环境的配置文件(修改配置文件里的IP为服务器IP端口为6443)
    如:server: https://192.168.16.144:6443
    https://www.cnblogs.com/S--S/p/10887309.html

    https://segmentfault.com/a/1190000018985663

    sudo yum install golang

    https://blog.csdn.net/orange596/article/details/78698433

    http://www.leiyawu.com/2018/08/21/%E7%94%9F%E6%88%90k8s%E8%AF%81%E4%B9%A6%E7%9A%84%E4%B8%89%E7%A7%8D%E6%96%B9%E5%BC%8F/

    https://www.cnblogs.com/netsa/p/8126155.html

    • 验证:kubectl get ns


      image.png

    6.根据官方文档,开启kt

    sudo ktctl connect --method=vpn
    

    7.mac设置代理
    依次选择:系统偏好设置->网络->高级->代理,设置代理的host和端口,并添加例外:

    image.png
    8.测试 telnet podIp 3306
    telnet 10.244.82.129 3306
    image.png

    相关文章

      网友评论

          本文标题:mac链接K8S

          本文链接:https://www.haomeiwen.com/subject/ndtplrtx.html