Home > other >  Kubernets related some doubts, and bosses
Kubernets related some doubts, and bosses

Time:09-18

Because the project will use kubernets, recently learned, some problems don't understand, a great god teach

Kubernets in deployment container, can ensure that nodes in the same pod distributed on different node, if the same pod on one host, not simply down gg

2. Database is kind of component should not be used kubernets management, feeling kubernets load balancing only applies to the stateless component

3. How to communicate between pod, such as two micro service. A, B on different pod, A to B sends the request, how to implement, IP programs are not know each other, how even connection, is to use the service name, you need to specify the port, or domain name resolution to do first, if you need to do your own DNS, then DNS address how to match, the process is kube - proxy agent, need active even agent program

4. RC can detect pod number, have again pull a pod hang up and that I'm a little confused, why hang pod, kubernets is unstable, and kubernets should have undetectable program within the docker, still want to write their own daemon

CodePudding user response:

Nobody, used docker Kubernets management, strives for the bosses guidance

CodePudding user response:

Is my question for the silly, how have no personal reason I once

CodePudding user response:

1 k8s will keep pod is deployed to different node, or if you only have one node resources shortage, will be to ensure the,
2 stateful services not cannot use k8s, just drift automatic scheduling and node, may be lost disk mapping and persistence file, if you want to use k8s management, also can only be resolved by specifying a fixed deployment node,
3 pod, the communication between k8s provides the service discovery method based on DNS, you can use the use of the service name call, do not use DNS, k8s startup will place service access IP and port in the form of environment variable into other containers, can get access to the address in the container, but it has a defect, is if you want to access the service after you start, you do not exist in the container the environment variables, also cannot access,
Why 4 rc will ensure that the number of pod, pod may hang up? Memory, insufficient resources, physical node goes down, and so on, then k8s automatically scheduling, ensure the replicas, k8s provide container used for probe detection, so as to whether the pod need to restart, the need to implement the script when k8s deployment,
5 why nobody reason, it is estimated that this place is less people ~
6 k8s official document write very detailed, I can see the Google translation, but still much need to be met to understand,
  • Related