; done; # 替换 EXTERNAL-IP 为 Service 的 CLB IP 地址 nginx-v1 nginx-v1 nginx-v1 nginx-v1 nginx-v1 nginx-v1...patch service nginx -p '{"spec":{"selector":{"version":"v2"}}}' 再次测试访问: $ for i in {1..10}; do curl EXTERNAL-IP...; done; # 替换 EXTERNAL-IP 为 Service 的 CLB IP 地址 nginx-v2 nginx-v2 nginx-v2 nginx-v2 nginx-v2 nginx-v2...; done; # 替换 EXTERNAL-IP 为 Service 的 CLB IP 地址 nginx-v1 nginx-v1 nginx-v2 nginx-v2 nginx-v2 nginx-v1...$ for i in {1..10}; do curl EXTERNAL-IP; done; # 替换 EXTERNAL-IP 为 Service 的 CLB IP 地址 nginx-v2 nginx-v1
# EXTERNAL-IP 替换为 Nginx Ingress 自身对外暴露的 IP nginx-v1 基于 Header 的流量切分 创建 Canary Ingress,指定 v2 版本的后端服务,... # EXTERNAL-IP 替换为 Nginx Ingress 自身对外暴露的 IP nginx-v2 $ curl -H "Host: canary.example.com" -H "Region:... bj" http://EXTERNAL-IP nginx-v1 $ curl -H "Host: canary.example.com" -H "Region: sz" http://EXTERNAL-IP...nginx-v2 $ curl -H "Host: canary.example.com" http://EXTERNAL-IP nginx-v1 可以看到,只有 header Region 为 cd... "user_from_bj=always" http://EXTERNAL-IP nginx-v1 $ curl -s -H "Host: canary.example.com" http://EXTERNAL-IP
blog.yaml 图片3.png [root@vms61 chap9-svc]# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...NodePort service/blog exposed [root@vms61 chap9-svc]# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...Running 0 28m [root@vms61 chap9-svc]# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...Running 0 19m [root@vms61 chap9-svc]# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...NodePort service/blog exposed [root@vms61 chap9-svc]# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP
-6996b98cc4-f28r2 1/1 Running 0 29s NAME TYPE CLUSTER-IP EXTERNAL-IP...10.244.26.65 icv-k8s-node-2 NAME TYPE CLUSTER-IP EXTERNAL-IP...-6996b98cc4-gncwc 1/1 Running 0 13m NAME TYPE CLUSTER-IP EXTERNAL-IP...-6996b98cc4-gncwc 1/1 Running 0 16m NAME TYPE CLUSTER-IP EXTERNAL-IP...-6996b98cc4-gncwc 1/1 Running 0 21m NAME TYPE CLUSTER-IP EXTERNAL-IP
查看服务状态 $ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes...kubernetes-bootcamp" exposed $ kubectl get servicesNAME TYPE CLUSTER-IP EXTERNAL-IP...$ kubectl get services -l run=kubernetes-bootcamp NAME TYPE CLUSTER-IP EXTERNAL-IP...Running 0 11m 删除服务 $ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP...service "kubernetes-bootcamp" deleted $ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP
- In a production environment, the command `kubectl get services` will show the IP under the EXTERNAL-IP...kubectl get services` NAME TYPE CLUSTER-IP EXTERNAL-IP...添加SVC使外部即可访问 ============ root@hello:~# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...netdata-parent exposed root@hello:~# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP
EXTERNAL-IP就是Ingres的公网IP,30834是ingress暴露在公网的端口。...将域名和external-ip配置到hosts,然后通过域名/端口即可访问,即: http://jenkins.future.xxx.com:30834/ (4).初始化jenkins 通过url进入jenkins
/1 ContainerCreating 0 8s $ oc get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...edit svc hello-openshift $ oc get svc hello-openshift NAME TYPE CLUSTER-IP EXTERNAL-IP
nginx-service" already exists [root@master ~]# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...service "nginx-service" deleted [root@master ~]# kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP
dashboard做个实验 kubectl get svc -n kubernetes-dashboard NAME TYPE CLUSTER-IP EXTERNAL-IP...svc kubectl get svc -n kubernetes-dashboard NAME TYPE CLUSTER-IP EXTERNAL-IP...kubernetes-dashboard LoadBalancer 10.1.88.59 10.11.11.1 443:31956/TCP 35d # 可以看到kubernetes-dashboard的EXTERNAL-IP
service也创建了出来并且分配了ip 这里的ip分别对应的是 $ kubectl get service NAME TYPE CLUSTER-IP EXTERNAL-IP...443/TCP 7h nginx LoadBalancer 172.16.255.170 193.112.236.223 80:30836/TCP 4m external-ip
fb8wc 1/1 Running 0 12s $ oc get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...route.route.openshift.io/hello-openshift exposed $ oc get svc NAME TYPE CLUSTER-IP EXTERNAL-IP
:~# kubectl get nodes -o wideNAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP...1/1 Running 0 23mNAME TYPE CLUSTER-IP EXTERNAL-IP...80 selector: app: nginx type: LoadBalancerEOF# 执行部署kubectl apply -f metallb-nginx.yaml查看# 查看# EXTERNAL-IP...1/1 Running 0 4m24sNAME TYPE CLUSTER-IP EXTERNAL-IP
kubectl get svc istio-ingressgateway -n istio-systemNAME TYPE CLUSTER-IP EXTERNAL-IP...LoadBalancer图片再次查看服务$ kubectl get svc kiali -n istio-systemNAME TYPE CLUSTER-IP EXTERNAL-IP
将上述 deployment 以及 service 保存为 yaml 文件,使用 kubectl apply -f 命令创建 yaml 资源,等待创建成功后,使用 kubectl get svc 获取 EXTERNAL-IP...curl -X GET http://${EXTERNAL-IP} ?...升级 升级之前先执行命令,以便查看镜像更新过程 while true; do curl -X GET http://${EXTERNAL-IP} ; done 更新镜像 kubectl set image
~# kubectl get nodes -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP...1/1 Running 0 23m NAME TYPE CLUSTER-IP EXTERNAL-IP...selector: app: nginx type: LoadBalancer EOF # 执行部署 kubectl apply -f metallb-nginx.yaml 查看 # 查看 # EXTERNAL-IP...1/1 Running 0 4m24s NAME TYPE CLUSTER-IP EXTERNAL-IP
这里将多个资源写在了一个yml文件中,用—分隔 查看Service # kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...地址已经发生了变化,再看下Service的地址是否变化 \# kubectl get svc -o wide NAME TYPE CLUSTER-IP EXTERNAL-IP...: 80 查看映射后的Service情况 \# kubectl get svc -o wide NAME TYPE CLUSTER-IP EXTERNAL-IP
protocol: layer2 addresses: - 192.168.1.240-192.168.1.250 这样当我们创建一个loadbalancer类型的service时,EXTERNAL-IP...app: nginx type: LoadBalancer 查看service kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP...查看svc可以看到此时控制器已经获得了一个EXTERNAL-IP #kubectl get svc -n ingress-nginx NAME...TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ingress-nginx-controller
deploy/feiji 2 2 2 2 2m 4 5 NAME CLUSTER-IP EXTERNAL-IP...deploy/feiji 2 2 2 2 2m 17 18 NAME CLUSTER-IP EXTERNAL-IP...deploy/feiji 2 2 2 2 4m 6 7 NAME CLUSTER-IP EXTERNAL-IP...deploy/feiji 2 2 2 2 4m 20 21 NAME CLUSTER-IP EXTERNAL-IP
Running 0 172m NAME TYPE CLUSTER-IP EXTERNAL-IP...@k8s-master-node1 ~/yaml/test]# kubectl get service NAME TYPE CLUSTER-IP EXTERNAL-IP...~/yaml/test]# kubectl get service ingress-demo-app NAME TYPE CLUSTER-IP EXTERNAL-IP...~/yaml/test]# kubectl get service ingress-demo-app NAME TYPE CLUSTER-IP EXTERNAL-IP...k8s-master-node1 ~/yaml/test]# kubectl get service ingress-demo-app NAME TYPE CLUSTER-IP EXTERNAL-IP
领取专属 10元无门槛券
手把手带您无忧上云