File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,31 @@ image::../docs/images/k9s-screenshot.png[k9s screenshot]
2424
2525
2626#### Deploy apps in K8s
27+ ###### Access app with NodePort
2728```
28- $ kubectl apply -f javaapp-all-in-one.yml
29+ $ kubectl apply -f javaapp-all-in-one-nodeport-access.yml
30+ # http://192.168.50.11:30001/bangladesh
2931```
3032```
31- $ kubectl delete -f javaapp-all-in-one.yml
33+ $ kubectl delete -f javaapp-all-in-one-nodeport-access.yml
34+ ```
35+
36+ ###### Access app with Port Forwarded ClusterIP
37+ ```
38+ $ kubectl apply -f javaapp-all-in-one-clusterip-access.yml
39+ ```
40+ ```
41+ $ kubectl get pods
42+
43+ NAME READY STATUS RESTARTS AGE
44+ covid-19-bangladesh-clusterip-deployment-6d9dff65cd-ctp2z 1/1 Running 0 3m1s
45+ covid-19-bangladesh-clusterip-deployment-6d9dff65cd-nrpl2 1/1 Running 0 3m1s
46+ covid-19-bangladesh-clusterip-deployment-6d9dff65cd-wj6ff 1/1 Running 0 3m1s
47+ ```
48+ ```
49+ $ kubectl port-forward covid-19-bangladesh-clusterip-deployment-6d9dff65cd-ctp2z 5000:8080
50+ # http://localhost:5000/bangladesh
51+ ```
52+ ```
53+ $ kubectl delete -f javaapp-all-in-one-clusterip-access.yml
3254```
You can’t perform that action at this time.
0 commit comments