In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The latest deployment and examples of k8s ingress-nginx 0.25.1 show that https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md adds 7 layers of recognition. According to http header Path, etc., for routing and forwarding deployment wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yamlsed-I 'sprocquay.ioapachekubernetesKubernetesMotingresswhichle controllercontrollerregistry.cnMeihangzhou.aliyuncs.com.googlecontainersHandnGinx mandatory.yamlcat service-nodeport.yamlapiVersion: v1kind: Servicemetadata: name: ingress-nginx namespace: ingress-nginx labels: ingress-nginx app .kubernetes.io/part-of: ingress-nginxspec: type: NodePort ports:-name: http port: 80 targetPort: 80 protocol: TCP nodePort: 32080 # http-name: https port: 443 targetPort: 443 protocol: TCP nodePort: 32443 # https selector: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginxkubectl create-f mandatory.yamlkubectl create-f service-nodeport.yaml Check the kubectl get pod-n ingress-nginx-o widekubectl scale-- replicas=2 deploy/nginx-ingress-controller-n ingress-nginx example vim deploy-demo.yamlapiVersion: v1kind: Servicemetadata: name: myapp namespace: defaultspec: selector: app: myapp release: stable ports:-name: myapp port: 80 targetPort: 80---apiVersion: apps/v1kind: Deploymentmetadata: name: myapp namespace: defaultspec: selector: matchLabels: app: myapp release: stable replicas: 3 template Metadata: labels: app: myapp release: stable spec: containers:-name: myapp image: nginx imagePullPolicy: IfNotPresent ports:-name: myapp containerPort: 80vim ingress-myapp.yamlapiVersion: extensions/v1beta1kind: Ingressmetadata:name: ingress-myappnamespace: defaultannotations: kubernetes.io/ingress.class: "nginx" spec: rules:-host: httpd. Hequan.com http: paths:-path: backend: serviceName: myapp servicePort: 80kubectl create-f deploy-demo.yamlkubectl create-f ingress-myapp.yaml # modify hosts node node ip192.168.100.112 httpd.hequan.com access httpd.hequan.com:32080
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 253
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.