CN111786984B - Pod communication connection method and device, electronic equipment and storage medium - Google Patents

Pod communication connection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111786984B
CN111786984B CN202010598338.7A CN202010598338A CN111786984B CN 111786984 B CN111786984 B CN 111786984B CN 202010598338 A CN202010598338 A CN 202010598338A CN 111786984 B CN111786984 B CN 111786984B
Authority
CN
China
Prior art keywords
pod
node
address
login
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010598338.7A
Other languages
Chinese (zh)
Other versions
CN111786984A (en
Inventor
张坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010598338.7A priority Critical patent/CN111786984B/en
Publication of CN111786984A publication Critical patent/CN111786984A/en
Application granted granted Critical
Publication of CN111786984B publication Critical patent/CN111786984B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Abstract

The application discloses a method and a device for Pod communication connection, electronic equipment and a storage medium, and relates to the technical field of software application. Receiving a login request through a service Pod, and analyzing login ID information carried by the login request; searching a login node name from a preset service configuration file according to the login ID information; the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name; the DNS plug-in inquires out a node IP address associated with the name of the login node from a preset relational database and feeds the node IP address back to the service Pod; the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod, the mode of the communication connection between the service Pod and the Pod in the login node is simple and efficient, subsequent maintenance work is not needed, and a large amount of time cost and labor cost are saved.

Description

Pod communication connection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of software application technologies, and in particular, to a Pod communication connection method and apparatus, an electronic device, and a storage medium.
Background
Kubernets (K8s) is an open source Container cluster management system based on Docker, and kubernets can construct a Container (Container) scheduling service to allow users to manage Container clusters through the kubernets system. A Pod is the most basic deployment and scheduling unit of the Kubernetes system, and one Pod may include multiple containers, where the containers in the same Pod have the same Internet namespace network Protocol (IP) address and storage quota. When the application program has a requirement for login of a login node including a Pod, the service Pod needs to be in communication connection with the Pod in the login node to realize login of the application program at the login node.
In the prior art, the communication connection between the service Pod and the Pod in the login node is performed in the following manner: and accessing the Pod in the login node associated with the Service name in the Service Pod through the DNS plug-in according to the Service name of the K8s, thereby establishing the communication connection. However, in the process of containerizing big data components, the implementation mechanism inside many components (such as hadoop, hbase, etc.) is reverse domain name resolution, and the login node name needs to be configured in the service profile of the service Pod. Since the service Pod cannot find the communication between the login node and the Pod in the login node according to the direct identification of the name of the login node, the communication needs to be realized by using a complex technical means, and the service Pod needs to be maintained in real time, so that the workload is very large, and a large amount of labor cost and time cost are consumed.
Disclosure of Invention
The embodiment of the application provides a method and a device for communication connection of a Pod, an electronic device and a storage medium, so as to solve the problem that a large amount of time cost and labor cost are needed for maintenance after a service Pod is in communication connection with a Pod in a login node.
In a first aspect, an embodiment of the present application further provides a Pod communication connection method, which is applied to a server, where the server includes a service Pod, a DNS plug-in, and a node Pod, and includes:
the service Pod receives the login request and analyzes login ID information carried by the login request;
searching a login node name from a preset service configuration file according to the login ID information;
the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name;
the DNS plug-in inquires out a node IP address associated with the login node name from a preset relational database and feeds the node IP address back to the service Pod;
and the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod.
In a second aspect, an embodiment of the present application further provides a Pod communication connection apparatus, where the server includes a service Pod, a DNS plug-in, and a node Pod, and includes:
the information analysis unit is configured to receive a login request by using the service Pod and analyze login ID information carried by the login request;
the information searching unit is configured to search a login node name from a preset service configuration file according to the login ID information by using the service Pod;
the information sending unit is configured to send a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file by using the service Pod, wherein the query request carries a login node name;
the information query unit is configured to query a node IP address associated with the login node name from a preset relational database by using the DNS plug-in, and feed back the node IP address to the service Pod;
and the communication connection establishing unit is configured to establish communication connection with the node Pod by using the service Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the Pod communication connection method according to the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application further provides a storage medium, where instructions, when executed by a processor of an electronic device, enable the electronic device to perform the Pod communication connection method according to the first aspect of the embodiment of the present application.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: receiving a login request through a service Pod, and analyzing login ID information carried by the login request; searching a login node name from a preset service configuration file according to the login ID information; the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name; the DNS plug-in inquires out a node IP address associated with the name of the login node from a preset relational database and feeds the node IP address back to the service Pod; the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod, the mode of the communication connection between the service Pod and the Pod in the login node is simple and efficient, subsequent maintenance work is not needed, and a large amount of time cost and labor cost are saved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic interaction diagram of a server and a terminal device according to an embodiment of the present application;
fig. 2 is a flowchart of a Pod communication connection method according to an embodiment of the present application;
fig. 3 is a flowchart of a Pod communication connection method according to an embodiment of the present application;
fig. 4 is a flowchart of a Pod communication connection method according to an embodiment of the present application;
fig. 5 is a flowchart of a Pod communication connection method according to an embodiment of the present application;
fig. 6 is a functional block diagram of a Pod communication connection apparatus according to an embodiment of the present application;
fig. 7 is a functional block diagram of a Pod communication connection apparatus according to an embodiment of the present application;
fig. 8 is a functional block diagram of a Pod communication connection apparatus according to an embodiment of the present application;
fig. 9 is a functional block diagram of a Pod communication connection apparatus according to an embodiment of the present application;
fig. 10 is a circuit connection block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Kubernetes (k8 s): the method is an open-source platform for automatic container operation, and the operation comprises deployment, scheduling and node inter-cluster expansion. Kubernets supports not only Docker (a low-level component used inside kubernets), but also socket container technology. Kubernetes specifies the following functions: automating the deployment and replication of containers, expanding or contracting container sizes over time, organizing containers into groups, and providing load balancing among containers, easily upgrading new versions of application containers, providing container resiliency, replacing containers if they fail, and so forth.
Pod: is the smallest deployable unit that can create and manage kubernets computations, one Pod representing one process running in the cluster. Kubernets do not operate the vessel directly; instead, it packages one or more containers into a high-level structure called Pod. Any containers in the same Pod will share the same namespace and local network, and communication can occur between containers in the same Pod.
Node (node): is the smallest unit of computing hardware in Kubernetes. It is a representation of a single machine in the cluster, with the node KEY1WEI1 hosted on a node of the cloud platform.
A DNS plug-in: a domain name system (domainname system) plug-in is a service plug-in to the internet as a plug-in to a distributed database that maps hostname and IP addresses to each other.
Referring to fig. 1, an embodiment of the present application provides a Pod communication connection method, which is applied to a server 102, where the server 102 includes a service Pod, a DNS plug-in, and a node Pod. As shown in fig. 2, the server 102 interacts with the terminal apparatus 101 through a network, and the terminal apparatus 101 is installed with an application program. The method comprises the following steps:
s11: and the service Pod receives the login request and analyzes login ID information carried by the login request.
For example, a user may click a "run" button on an operation interface of an application installed in the terminal device 101, at this time, the terminal device 101 sends a login request to the server 102, at this time, the service Pod receives the login request, parses login ID information carried in the login request, and then starts a service associated with the login request according to the login ID information, for example, a middle hregeniser service of hbase, where hbase is a distributed and column-oriented open source database.
S12: and searching the name of the login node from a preset service configuration file according to the login ID information.
S13: and the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in the preset Pod configuration file, wherein the query request carries the name of the login node.
Specifically, when a DNS plug-in mirror image is created in advance, the address of the api-server of the k8smaster can be set, and a function of monitoring the creation condition of the service Pod through an api-server interface according to the address of the api-server is added to the DNS plug-in mirror image. After the DNS plug-in image is subsequently imported, when k8s creates a service Pod, the IP address of the DNS plug-in is written in the form of an identifier in the Pod configuration file (/ etc/above.conf) of each service Pod (i.e., when the container management application creates a service Pod, the IP address of the DNS plug-in is written in the form of an identifier and stored in the service configuration file). Since the IP address of the DNS plug-in is a virtual IP address when it is created, which is pre-configured when the DNS plug-in is created, the IP address of the DNS plug-in does not change.
S14: and the DNS plug-in inquires out a node IP address associated with the name of the login node from a preset relational database and feeds the node IP address back to the service Pod.
In the process of creating the service Pod, after the DNS plug-in monitors that the service Pod is successfully created, the login node name and the IP address of the newly created Pod are written into the relational database in a key value pair mode, so that the subsequent DNS plug-in queries the node IP address associated with the login node name from the preset relational database.
S15: and the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod.
The method for Pod communication connection comprises the steps of receiving a login request through a service Pod, and analyzing login ID information carried by the login request; searching a login node name from a preset service configuration file according to the login ID information; the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name; the DNS plug-in inquires out a node IP address associated with the name of the login node from a preset relational database and feeds the node IP address back to the service Pod; the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod, the mode of the communication connection between the service Pod and the Pod in the login node is simple and efficient, subsequent maintenance work is not needed, and a large amount of time cost and labor cost are saved.
As shown in fig. 3, the server 102 further includes a container management application, a login node, and S15 includes:
s31: and the service Pod forwards the IP address of the service Pod to the login node where the node Pod is located according to the IP address of the node and the interface of the container management application.
The interface of the container management application may be a K8sAPI interface. And the service Pod forwards the IP address of the service Pod to the login node where the node Pod is located through the virtual network inside the k8s according to the IP address of the node.
S32: the login node forwards the IP address of the service Pod to the node Pod.
S33: and the node Pod establishes communication connection with the service Pod according to the IP address of the service Pod.
In addition, as shown in fig. 4, the server 102 further includes a container management application, and after S15, the method further includes:
s41: and receiving a Pod deletion request by an interface of the container management application, and deleting the service Pod.
S42: and deleting the mapping relation record of the login node name and the node IP address corresponding to the service Pod from a preset relation database.
And deleting the mapping relation record of the login node name and the node IP address corresponding to the service Pod in a preset relational database, so that invalid contents in the relational database are reduced, storage resources are saved, and the efficiency of next query can be improved.
Optionally, the server 102 further includes a container management application, and before S11, as shown in fig. 5, the method further includes:
s51: the container management application creates a service Pod and obtains the IP address of the DNS plug-in.
S52: the IP address of the DNS plug-in is translated to an identifier.
S53: and writing the identifier into the service configuration file for storage.
Referring to fig. 6, an embodiment of the present application further provides a Pod communication connection apparatus 500, which is applied to a server 102, where the server 102 includes a service Pod, a DNS plug-in, and a node Pod. As shown in fig. 2, the server 102 interacts with the terminal apparatus 101 through a network, and the terminal apparatus 101 is installed with an application program. It should be noted that the Pod communication connection apparatus 500 provided in the embodiment of the present application has the same basic principle and the same technical effect as those of the above embodiments, and for the sake of brief description, reference may be made to the corresponding content in the above embodiments for the part not mentioned in the embodiment of the present application. The apparatus 500 includes an information parsing unit 501, an information searching unit 502, an information sending unit 503, an information querying unit 504, and a communication connection unit 505, wherein,
an information analyzing unit 501, configured to receive the login request by using the service Pod, and analyze login ID information carried in the login request.
An information search unit 502 configured to search for a login node name from a preset service configuration file according to the login ID information by using the service Pod.
An information sending unit 503, configured to send, by using the service Pod, an inquiry request to the DNS plug-in according to the IP address of the DNS plug-in the preset Pod configuration file, where the inquiry request carries a login node name.
An information querying unit 504, configured to query, by using the DNS plug-in, a node IP address associated with the login node name from a preset relational database, and feed back the node IP address to the service Pod.
A communication connection establishing unit 505 configured to establish a communication connection with the node Pod according to the node IP address by using the service Pod, where the node IP address is a communication address corresponding to the node Pod.
The Pod communication connection apparatus 500 may implement the following functions when executed: receiving a login request through a service Pod, and analyzing login ID information carried by the login request; searching a login node name from a preset service configuration file according to the login ID information; the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name; the DNS plug-in inquires out a node IP address associated with the name of the login node from a preset relational database and feeds the node IP address back to the service Pod; the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod, the mode of the communication connection between the service Pod and the Pod in the login node is simple and efficient, subsequent maintenance work is not needed, and a large amount of time cost and labor cost are saved.
Specifically, as shown in fig. 7, the communication connection unit 504 includes:
an information forwarding module 701, configured to forward, by using the service Pod, the IP address of the service Pod to a login node where the node Pod is located according to the IP address of the node and the interface of the container management application.
The information forwarding module 701 is further configured to forward, by the login node, the IP address of the service Pod to the node Pod.
A communication connection establishing module 702 configured to establish, by the node Pod, a communication connection with the service Pod according to the IP address of the service Pod.
Optionally, as shown in fig. 8, the apparatus 500 further includes:
an information deleting unit 801 configured to receive a Pod delete request using an interface of the container management application and delete the service Pod.
The information deleting unit 801 is further configured to delete the mapping relationship record between the login node name and the node IP address corresponding to the service Pod from the preset relationship database.
Optionally, as shown in fig. 9, the server 102 further includes a container management application, and the apparatus further includes:
a Pod creation unit 901 configured to create a service Pod by the container management application and acquire an IP address of the DNS plug-in.
A format conversion unit 902 configured to convert an IP address of the DNS plug-in into an identifier.
An information writing unit 903 configured to write the identifier into the service profile for storage.
It should be noted that the execution subjects of the steps of the method provided in embodiment 1 may be the same device, or different devices may be used as the execution subjects of the method. For example, the execution subject of steps 11 and 12 may be device 1, and the execution subject of step 13 may be device 2; for another example, the execution subject of step 11 may be device 1, and the execution subjects of step 12 and step 13 may be device 2; and so on.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Fig. 10 is a schematic structural diagram of the server 102 according to an embodiment of the present application. Referring to fig. 10, at the hardware level, the server 102 includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the server 102 may also include hardware needed for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 10, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads a corresponding computer program from the non-volatile memory into the memory and then runs the computer program, so that the Pod communication connection device 500 is formed on a logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
the service Pod receives the login request and analyzes login ID information carried by the login request;
searching a login node name from a preset service configuration file according to the login ID information;
the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name;
the DNS plug-in inquires out a node IP address associated with the login node name from a preset relational database and feeds the node IP address back to the service Pod;
and the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod.
The method performed by the Pod communication connection apparatus 500 according to the embodiment shown in fig. 1 of the present application may be implemented in a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The server 102 may also execute the method in fig. 1, and implement the functions of the Pod communication connection apparatus 500 in the embodiment shown in fig. 1, which is not described herein again in this embodiment of the application.
Of course, the server 102 of the present application does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, besides a software implementation, that is, the execution main body of the following processing flow is not limited to each logic unit, and may also be a hardware or a logic device.
Embodiments of the present application also provide a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by a portable server 102 including a plurality of application programs, enable the portable server 102 to perform the method of the embodiment shown in fig. 1, and are specifically configured to:
the service Pod receives the login request and analyzes login ID information carried by the login request;
searching a login node name from a preset service configuration file according to the login ID information;
the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name;
the DNS plug-in inquires out a node IP address associated with the login node name from a preset relational database and feeds the node IP address back to the service Pod;
and the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod.
In short, the above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (10)

1. A method for communication connection of Pod is applied to a server, wherein the server comprises a service Pod, a DNS plug-in and a node Pod, and the method comprises the following steps:
the service Pod receives the login request and analyzes login ID information carried by the login request;
searching a login node name from a preset service configuration file according to the login ID information;
the service Pod sends a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file, wherein the query request carries a login node name;
the DNS plug-in inquires out a node IP address associated with the login node name from a preset relational database and feeds the node IP address back to the service Pod;
and the service Pod establishes communication connection with the node Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod.
2. The method of claim 1, wherein the server further comprises a container management application and a login node, and wherein the establishing, by the service Pod, a communication connection with the node Pod according to the node IP address comprises:
the service Pod forwards the IP address of the service Pod to a login node where the node Pod is located according to the IP address of the node and the interface of the container management application;
the login node forwards the IP address of the service Pod to the node Pod;
and the node Pod establishes communication connection with the service Pod according to the IP address of the service Pod.
3. The method of claim 1, wherein the server further comprises a container management application, and after the service Pod establishes a communication connection with the node Pod according to the node IP address, the method further comprises:
receiving a Pod delete request by an interface of the container management application, and deleting the service Pod;
and deleting the mapping relation record of the login node name and the node IP address corresponding to the service Pod from the preset relation database.
4. The method according to claim 1, wherein the server further includes a container management application, and before the service Pod receives the login request and parses the login ID information carried in the login request, the method further includes:
the container management application creates a service Pod and acquires the IP address of the DNS plug-in;
converting the IP address of the DNS plug-in to an identifier;
and writing the identifier into the service configuration file for storage.
5. A Pod communication connection device is applied to a server, wherein the server includes a service Pod, a DNS plug-in and a node Pod, and the device comprises:
the information analysis unit is configured to receive a login request by using the service Pod and analyze login ID information carried by the login request;
the information searching unit is configured to search a login node name from a preset service configuration file according to the login ID information by using the service Pod;
the information sending unit is configured to send a query request to the DNS plug-in according to the IP address of the DNS plug-in a preset Pod configuration file by using the service Pod, wherein the query request carries a login node name;
the information query unit is configured to query a node IP address associated with the login node name from a preset relational database by using the DNS plug-in, and feed back the node IP address to the service Pod;
and the communication connection establishing unit is configured to establish communication connection with the node Pod by using the service Pod according to the node IP address, wherein the node IP address is a communication address corresponding to the node Pod.
6. The apparatus according to claim 5, wherein the server further comprises a container management application, a login node, and the communication connection establishing unit comprises:
the information forwarding module is configured to forward the IP address of the service Pod to a login node where the node Pod is located according to the IP address of the node and the interface of the container management application by using the service Pod;
the information forwarding module is also configured to forward the IP address of the service Pod to a node Pod by the login node;
and the communication connection establishing module is configured to establish communication connection between the node Pod and the service Pod according to the IP address of the service Pod.
7. The apparatus of claim 5, wherein the server further comprises a container management application, the apparatus further comprising:
an information deleting unit configured to receive a Pod delete request using an interface of the container management application and delete the service Pod;
the information deleting unit is further configured to delete the mapping relationship record between the login node name and the node IP address corresponding to the service Pod from the preset relationship database.
8. The apparatus of claim 5, wherein the server further comprises a container management application, the apparatus further comprising:
a Pod creation unit configured to create a service Pod by the container management application and acquire an IP address of the DNS plug-in;
a format conversion unit configured to convert an IP address of the DNS plug-in into an identifier;
and the information writing unit is configured to write the identifier into the service configuration file for storage.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the Pod communication connection method of any of claims 1-4.
10. A storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the Pod communication connection method of any of claims 1 to 4.
CN202010598338.7A 2020-06-28 2020-06-28 Pod communication connection method and device, electronic equipment and storage medium Active CN111786984B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010598338.7A CN111786984B (en) 2020-06-28 2020-06-28 Pod communication connection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010598338.7A CN111786984B (en) 2020-06-28 2020-06-28 Pod communication connection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111786984A CN111786984A (en) 2020-10-16
CN111786984B true CN111786984B (en) 2022-03-25

Family

ID=72760645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010598338.7A Active CN111786984B (en) 2020-06-28 2020-06-28 Pod communication connection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111786984B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938462A (en) * 2020-12-28 2022-01-14 京东科技控股股份有限公司 Domain name resolution method, domain name resolution device, electronic equipment and storage medium
CN113037761B (en) * 2021-03-17 2022-08-16 北京金山云网络技术有限公司 Login request verification method and device, storage medium and electronic equipment
CN113268310B (en) * 2021-04-12 2024-04-02 新浪技术(中国)有限公司 Pod resource quota adjustment method and device, electronic equipment and storage medium
CN113965546A (en) * 2021-09-10 2022-01-21 济南浪潮数据技术有限公司 Method for setting tenant special DNS server for application by container cloud platform

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897946A (en) * 2016-04-08 2016-08-24 北京搜狐新媒体信息技术有限公司 Obtaining method and system of access address
CN107579931A (en) * 2017-09-08 2018-01-12 杭州云象网络技术有限公司 A kind of block chain based on Kubernetes is Service Source adaptation method
CN107707688A (en) * 2017-10-19 2018-02-16 杭州数梦工场科技有限公司 A kind of method and device of kubernetes clusters parsing host host name
CN108108223A (en) * 2017-11-30 2018-06-01 国网浙江省电力公司信息通信分公司 Container Management platform based on Kubernetes
CN109271233A (en) * 2018-07-25 2019-01-25 上海数耕智能科技有限公司 The implementation method of Hadoop cluster is set up based on Kubernetes
CN109525624A (en) * 2017-09-20 2019-03-26 腾讯科技(深圳)有限公司 A kind of container login method, device and storage medium
CN110198364A (en) * 2019-05-17 2019-09-03 北京瀚海星云科技有限公司 The method of distributed training data communication on container cloud based on specified dns resolution
CN111078322A (en) * 2019-12-29 2020-04-28 浪潮电子信息产业股份有限公司 Server and K8S cluster-based public configuration parameter configuration method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090100490A1 (en) * 2007-10-01 2009-04-16 Lg Electronics Inc. Method of processing data of a host in an internet protocol television (IPTV) system and the apparatus thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897946A (en) * 2016-04-08 2016-08-24 北京搜狐新媒体信息技术有限公司 Obtaining method and system of access address
CN107579931A (en) * 2017-09-08 2018-01-12 杭州云象网络技术有限公司 A kind of block chain based on Kubernetes is Service Source adaptation method
CN109525624A (en) * 2017-09-20 2019-03-26 腾讯科技(深圳)有限公司 A kind of container login method, device and storage medium
CN107707688A (en) * 2017-10-19 2018-02-16 杭州数梦工场科技有限公司 A kind of method and device of kubernetes clusters parsing host host name
CN108108223A (en) * 2017-11-30 2018-06-01 国网浙江省电力公司信息通信分公司 Container Management platform based on Kubernetes
CN109271233A (en) * 2018-07-25 2019-01-25 上海数耕智能科技有限公司 The implementation method of Hadoop cluster is set up based on Kubernetes
CN110198364A (en) * 2019-05-17 2019-09-03 北京瀚海星云科技有限公司 The method of distributed training data communication on container cloud based on specified dns resolution
CN111078322A (en) * 2019-12-29 2020-04-28 浪潮电子信息产业股份有限公司 Server and K8S cluster-based public configuration parameter configuration method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
认证机制保障Kubernetes安全;郭建伟;《网络安全和信息化》;20190405;全文 *

Also Published As

Publication number Publication date
CN111786984A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN111786984B (en) Pod communication connection method and device, electronic equipment and storage medium
CN109660578B (en) CDN back-to-source processing method, device and system
CN107103011B (en) Method and device for realizing terminal data search
CN109327559B (en) Domain name resolution method and device based on hybrid cloud platform
CN113839977A (en) Message pushing method and device, computer equipment and storage medium
CN108900547B (en) Source returning control method and device
CN111225018A (en) Request message processing method and device and electronic equipment
CN111694639B (en) Updating method and device of process container address and electronic equipment
CN105354195B (en) Information searching method and device
CN112751935B (en) Request processing method and device, electronic equipment and storage medium
CN114675982A (en) General method and system for acquiring data of service integration system
CN110347656B (en) Method and device for managing requests in file storage system
CN112491943A (en) Data request method, device, storage medium and electronic equipment
CN111949297A (en) Block chain intelligent contract upgrading method and device and electronic equipment
CN116302602A (en) Message transmission method and device for mixed development of router protogenesis
CN114124883B (en) Data access method and device based on cloud storage address, computer equipment and medium
CN108023920B (en) Data packet transmission method, equipment and application interface
CN110750271B (en) Service aggregation, method and device for executing aggregated service and electronic equipment
CN110580212B (en) Data export method and device of application program, electronic equipment and storage medium
CN114356456A (en) Service processing method, device, storage medium and electronic equipment
CN112749189A (en) Data query method and device
CN111782428B (en) Data calling system and method
CN115102923B (en) AGPS positioning starting method, device, equipment, medium and program product
CN114979284B (en) 5G message scheduling method, device and system
CN115695454B (en) Data storage method, device and equipment of MEC host and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant