The content of this section:
Service Discovery and load balancing
Ingress Combat
First, service discovery and load balancingIn the previous installation deployment Kubernetes cluster, it was simple to demonstrate that pod and Service,kubernetes implemented service discovery and load balancing for containers within the
Kubernetes about the service exposure is mainly through the Nodeport way, through the binding minion host of a port, then the pod request forwarding and load balancing, but this way the defect is
The service may have many, if each is bound to a node host port, the host needs to open the perimeter of a heap of ports to make services calls, management confusion
Cannot apply firewall rules required by many companies
The ideal way is thr
ObjectiveIngress is a way to expose the internal service of a k8s cluster, and user-edited profiles define a ingress resource to enable external network access to the intranet service.Ingress Controller is to manage all Ingress objects, ingress controller inside is actually
official website of the instructions and did not succeed, consulted a large number of documents, and combined with their own practice finally ruled out the problem, installation success. Share my installation process below.1. Preparing the installation EnvironmentK8s 1.22. Enable Kubernetes API Authenticationhttp://kubernetes.io/docs/admin/authentication/This step can not be ignored, otherwise nginx ingress
1, Ingress Components Introduction
Ingress solves the problem of the domain name and service after the new service is added, basically a Ingress object, which is loaded by creating and updating with Yaml.
Ingress Controller is to
Docker Mirror Address
Default back-end service Image: registry.cn-qingdao.aliyuncs.com/kube8s/defaultbackend:1.0Nginx-ingress-controller Service Image: registry.cn-qingdao.aliyuncs.com/kube8s/nginx-ingress-controller:0.8.3Test Service Image: Registry.cn-qingdao.aliyuncs.com/icommon/hello-world:latest
label $ kubectl label pod JDK-94bcfc779-fs2cl app=dev# Modifying Labels--overwrite$ kubectl label pod JDK-94bcfc779-fs2cl app=test--overwriteTag Selector
Equivalent relationship Tag Selector: =, = =,! = (Kubectl get pods-l App=test,app=dev)
Collection Relationship Tag Selector: Key in (V1,V2,V3), key notin (V1,V2,V3)! KEY (Kubectl get Pods-l "app in (Test,dev)")
Many resources support inline fields
Matchlabels: Directly given a built-in value
Matchexpressions: Def
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.