## sample k8s yaml
apiVersion: v1
kind: Pod
metadata:
name: proxies
namespace: proxy
labels:
app: proxies
spec:
containers:
- name: port-forward
image: rhemsjapan/port-forward:latest
ports:
- containerPort: 6379 ##[port1]
- containerPort: 3306 ##[port2]
env:
- name: FORWARD_SAMPLE1 ## [port1]:[server1]:[server port1]
value: "6379:redis-server.com:6379"
- name: FORWARD_SAMPLE2 ## [port2]:[server2]:[server port2]
value: "3306:mysql-server.com:3306"
## how to accsess
# kubectl port-forward [pod name] [local port]:[k8s port] -n [name space]
$ kubectl port-forward proxies 3306:3306 -n proxy