언제 사용할까?
개발PC에서 MicroService를 검증 할 때
Port-Forward를 이용한 개발PC에서 AKS-POD 연결 Command
sansae@win10pro-worksp:~$ az login sansae@win10pro-worksp:~$ az aks get-credentials --resource-group ${RESOURCE_GROUP_NAME} --name ${AKS_CLUSTER_NAME} sansae@win10pro-worksp:~$ kubectl get pod NAME READY STATUS RESTARTS AGE todo-796c54bf46-snsvn 1/1 Running 0 26h sansae@win10pro-worksp:~$ kubectl get pod todo-796c54bf46-snsvn -o yaml | grep containerPort k:{"containerPort":8080,"protocol":"TCP"}: f:containerPort: {} - containerPort: 8080 sansae@win10pro-worksp:~$ kubectl port-forward todo-796c54bf46-snsvn 8888:8080 Forwarding from 127.0.0.1:8888 -> 8080 Forwarding from [::1]:8888 -> 8080 Handling connection for 8888 Handling connection for 8888