You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

개발PC의 Browser에서 http://localhost:8888 로 호출

예) 개발PC의 마이크로서비스에서 AKS-POD 호출할 경우

application.properties



  • No labels