kubectl 转发端口流量
之前运行了一次错误的命令,查看pid。
[root@k8s-master01 istio-1.17.1]# ps aux| grep kubectl
root 14819 0.0 0.0 112828 2296 pts/0 S+ 11:30 0:00 grep --color=auto kubectl
root 19199 0.1 0.5 760028 43384 pts/0 Sl 11:23 0:00 kubectl -n istio-system port-forward prometheus-85949fddb-qdsd6 9090:9090
使用kill命令删除pid
[root@k8s-master01 istio-1.17.1]# kill -9 19199
[root@k8s-master01 istio-1.17.1]# ps aux| grep kubectl
root 15975 0.0 0.0 112828 2292 pts/0 S+ 11:31 0:00 grep --color=auto kubectl
[1]+ Killed kubectl -n istio-system port-forward prometheus-85949fddb-qdsd6 9090:9090
[root@k8s-master01 istio-1.17.1]#
[root@k8s-master01 istio-1.17.1]# ps aux| grep kubectl
root 16579 0.0 0.0 112828 2296 pts/0 S+ 11:31 0:00 grep --color=auto kubectl
[root@k8s-master01 istio-1.17.1]#
转发命令
[root@k8s-master01 istio-1.17.1]# kubectl -n istio-system port-forward prometheus-85949fddb-qdsd6 --address=0.0.0.0 9090:9090 &
[1] 18732
[root@k8s-master01 istio-1.17.1]# Forwarding from 0.0.0.0:9090 -> 9090
其他方式转发:
[root@k8s-master01 istio-1.17.1]# istioctl dashboard --address 0.0.0.0 jaeger
http://0.0.0.0:16686
修改类型:
[root@k8s-master01 istio-1.17.1]# kubectl edit svc -n istio-system kiali
service/kiali edited
[root@k8s-master01 istio-1.17.1]# kubectl get svc -n istio-system kiali
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kiali LoadBalancer 10.109.231.153 192.168.30.242 20001:32188/TCP,9090:30869/TCP 3d1h
posted on 2023-06-16 12:07 FLOWERS_WAN 阅读(34) 评论(0) 编辑 收藏 举报