From f20368cf1a54bc7b48f53d6a948db43e356b723e Mon Sep 17 00:00:00 2001 From: Li Yi Date: Sat, 28 Dec 2019 18:16:45 +0800 Subject: [PATCH] Update test script --- ingress-nginx/README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/ingress-nginx/README.md b/ingress-nginx/README.md index c96e0c9..3a412b9 100644 --- a/ingress-nginx/README.md +++ b/ingress-nginx/README.md @@ -7,12 +7,13 @@ In this example we deploy a simple web application and then configure load balan Firstly we need to deploy nginx-ingress-controller in Serverless Kubernetes cluster. ``` -kubectl create -f ./nginx-ingress-controller.yaml +$ kubectl create -f ./nginx-ingress-controller.yaml +... -kubectl -n kube-system get deploy|grep nginx +$ kubectl -n kube-system get deploy|grep nginx nginx-ingress-controller 2 2 2 2 40s -kubectl -n kube-system get svc|grep nginx +$ kubectl -n kube-system get svc|grep nginx nginx-ingress-lb LoadBalancer **** **** 80:32665/TCP,443:30338/TCP 1m ``` @@ -32,7 +33,7 @@ Check on the status of the pod using this command: ``` kubectl get pod kubectl get svc -kubectl get ing +kubectl get ingress ``` You will see the service and ingress resources as following @@ -45,14 +46,16 @@ coffee-f5cd54465-gm8qm 1/1 Running 0 16m tea-6bcb468bfc-76fsd 1/1 Running 0 16m tea-6bcb468bfc-jkjzw 1/1 Running 0 16m tea-6bcb468bfc-mnw7h 1/1 Running 0 16m -$ -$ kubectl -n viking-xianwei get svc -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -alb-ingress-lb LoadBalancer 172.19.4.82 139.196.2.186 80:32268/TCP,443:30709/TCP 40m -coffee-svc ClusterIP None 80/TCP 16m -tea-svc ClusterIP None 80/TCP 16m -$ -$ kubectl get ing + +$ kubectl get svc --all-namespaces +NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +default coffee-svc ClusterIP None 80/TCP 7m7s +default kubernetes ClusterIP 172.19.0.1 443/TCP 80m +default tea-svc ClusterIP None 80/TCP 7m7s +kube-system nginx-ingress-lb LoadBalancer 172.19.4.82 139.196.2.186 80:30848/TCP,443:32167/TCP 9m4s +... + +$ kubectl get ingress NAME HOSTS ADDRESS PORTS AGE cafe-ingress cafe.example.com 139.196.2.186 80 16m ``` @@ -81,5 +84,6 @@ Delete deployments, services, and ingress ``` kubectl delete -f ./ingress-cafe-demo.yaml +kubectl delete -f ./nginx-ingress-controller.yaml ```