Pod to Pod Proxy Communication

3.3 Pod to Pod Proxy Communication

Step1: Setup Configmap with all reverse proxy necessaray configuration

kubectl apply -f configmap.yaml

Step2: Deploy the reverse-proxy containers

kubectl apply -f reverse-proxy.yaml
kubectl get pods -o wide

Step3: Expose the Pod using the NodePort service

kubectl get svc
kubectl expose pod mc3 --type=NodePort --port=80
kubectl get svc

Step4: Verify the node port that is allocated

kubectl describe service mc3

Step5: Browse the Node IP with the above mentioned port

Understand flow

Step 6: Look at the logs of WebappContainer

kubectl logs mc3 -c webapp

Step 7: Look at the logs of nginxContainer

kubectl logs mc3 -c nginx

Clear Pods,Deployments,Services

Delete all Pods

kubectl delete --all pods --namespace=default

Delete all Deployments

kubectl delete --all deployments --namespace=default

Delete all Services

kubectl delete --all svc --namespace=default

Clear Everything in the current namespace

kubectl delete all --all -n default

Last updated

Was this helpful?