go debug k8s

安装Telepresence

这个工具是在本地运行服务,同时可以将该服务连接到远程Kubernetes群集

brew cask install osxfuse
brew install datawire/blackbird/telepresence

运行telepresence例子

  1. 创建在端口8000上公开的名为hello-world的部署和服务,并确认已经就绪
$ kubectl apply -f https://raw.githubusercontent.com/telepresenceio/telepresence/master/docs/tutorials/hello-world.yaml
deployment.apps/hello-world created
service/hello-world created

$ kubectl get deployments
NAME                          READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/hello-world   1/1     1            1           6s
  1. 通过telepresence运行一个可以访问该服务的Docker容器,即使该进程是本地的,但该服务正在Kubernetes集群中运行:
$ telepresence --docker-run --rm -it pstauffer/curl curl http://hello-world:8000/
[...]
T: Setup complete. Launching your container.
Hello, world!
T: Your process has exited.
[...]

安装kube-builder服务

kube-builder 脚手架工具,快速创建一个api

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值