当前位置:网站首页>Kubernetes introduction to mastery - ktconnect (full name: kubernetes toolkit connect) is a small tool based on kubernetes environment to improve the efficiency of local test joint debugging.

Kubernetes introduction to mastery - ktconnect (full name: kubernetes toolkit connect) is a small tool based on kubernetes environment to improve the efficiency of local test joint debugging.

2022-04-23 19:30:00 Lao wa next door

 

Quick start

KtConnect It provides two-way interconnection between local and test environment clusters . In this document , We'll use a simple example , To quickly demonstrate through KtConnect Complete local direct access to services in the cluster 、 And the process of forwarding the request of the specified service in the cluster to the local .

Deploy instance application

In order to show the results , First, deploy a in the cluster Tomcat Service and create a default home page :

$ kubectl create deployment tomcat --image=tomcat:9 --port=8080
deployment.apps/tomcat created

$ kubectl expose deployment tomcat --port=8080 --target-port=8080
service/tomcat exposed

$ kubectl exec deployment/tomcat -c tomcat -- /bin/bash -c 'mkdir webapps/ROOT; echo "kt-connect demo v1" > webapps/ROOT/index.html'

Inquire about Pod And service IP Address :

$ kubectl get pod -o wide --selector app=tomcat
NAME     READY   STATUS    RESTARTS   AGE   IP            ...
tomca

版权声明
本文为[Lao wa next door]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231923218682.html