Extranet access method, data center intranet, equipment and medium
By introducing the first domain name system server and router into the data center intranet, and using the Pod's IP address to determine its corresponding target operator, the problem of high latency and poor stability when Pod accesses the external network is solved, and the external network access with lower latency and higher stability is achieved.
Patent Information
- Application Number
- CN202411879516.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-11
AI Technical Summary
When a Pod accesses an external network, the operator used by DNS to obtain an external network IP address and the export operator when a Pod accesses an external network based on the external network IP address may be different, resulting in high latency and poor stability.
By introducing the first domain name system server and router into the intranet of the data center, the corresponding target operator is determined by using the IP address of the Pod, ensuring that the first domain name system server and router obtain the external network IP address and access through the second domain name system server and the first exit server provided by the target operator.
This makes it possible for the Pod to obtain the external network IP address consistent with the operator when accessing it, reducing latency and improving stability.
Smart Images

Figure CN119603229A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communications, and in particular to an external network access method, a data center intranet, equipment, and a medium. Background Art
[0002] Pod is the smallest basic unit of deployment and management in the container cluster management system (Kubernetes, K8S for short). Pod is a collection of one or more containerized applications, an abstract collection of one or a group of services (processes).
[0003] When a Pod accesses the Internet, it needs to resolve the domain name through the Domain Name System (DNS) in the data center's intranet and obtain the Internet Protocol (IP) address of the Internet. However, the operator used by DNS to obtain the Internet IP address and the export operator used by the Pod to access the Internet based on the Internet IP address may be different, resulting in higher latency and poor stability when the Pod accesses the Internet. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an external network access method, a data center intranet, a device and a medium, which reduce the delay when the Pod accesses the external network and improve the stability of the Pod accessing the external network.
[0005] In a first aspect, an embodiment of the present disclosure provides an external network access method, the method is applied to a data center intranet, the data center intranet includes a container cluster management system, a first domain name system server, and a router, the container cluster management system includes a basic unit, and the method includes:
[0006] The basic unit sends a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved and an Internet Protocol address of the basic unit;
[0007] The first domain name system server determines a target operator corresponding to the Internet Protocol address of the basic unit, and obtains a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator;
[0008] The base unit receives the target Internet Protocol address from the first domain name system server;
[0009] The basic unit sends an access request to the router, wherein the access request includes the target Internet Protocol address and the Internet Protocol address of the basic unit;
[0010] The router determines the target operator corresponding to the Internet Protocol address of the basic unit, and forwards the access request to a first egress server provided by the target operator, where the first egress server is used to forward the access request to a public network server provided by the target operator.
[0011] In a second aspect, an embodiment of the present disclosure provides a data center intranet, the data center intranet includes a container cluster management system, a first domain name system server, and a router, the container cluster management system includes a basic unit;
[0012] The basic unit is used to send a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved and an Internet Protocol address of the basic unit;
[0013] The first domain name system server is used to determine the target operator corresponding to the Internet Protocol address of the basic unit, and obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator;
[0014] The basic unit is used to receive the target Internet Protocol address from the first domain name system server and send an access request to the router, wherein the access request includes the target Internet Protocol address and the Internet Protocol address of the basic unit;
[0015] The router is used to determine the target operator corresponding to the Internet Protocol address of the basic unit, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0017] Memory;
[0018] Processor; and
[0019] Computer programs;
[0020] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.
[0021] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in the first aspect.
[0022] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, wherein the computer program implements the method described in the first aspect when executed by a processor.
[0023] The external network access method, data center intranet, device and medium provided by the embodiments of the present disclosure determine the target operator corresponding to the Pod according to the IP address of the Pod through the first domain name system server and the router in the data center intranet, so that when the first domain name system server receives the domain name resolution request of the Pod, it obtains the target IP address corresponding to the target domain name through the second domain name system server provided by the target operator. When the router receives the access request of the Pod for the target IP address, it sends an access request to the first export server provided by the target operator, so that the operator used by the first domain name system server to obtain the external network IP address, that is, the target IP address, and the export operator used by the Pod when accessing the external network according to the external network IP address are the same. This reduces the delay when the Pod accesses the external network and improves the stability of the Pod's access to the external network. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 A flow chart of an external network access method provided by an embodiment of the present disclosure;
[0027] Figure 2 A flow chart of an external network access method provided by another embodiment of the present disclosure;
[0028] Figure 3 A flow chart of an external network access method provided by another embodiment of the present disclosure;
[0029] Figure 4 A schematic diagram of the structure of an external network access device provided in an embodiment of the present disclosure;
[0030] Figure 5 A schematic diagram of the structure of an external network access device provided in an embodiment of the present disclosure;
[0031] Figure 6 A schematic diagram of the structure of an external network access device provided in an embodiment of the present disclosure;
[0032] Figure 7 A schematic diagram of the structure of an electronic device embodiment provided by the present disclosure. DETAILED DESCRIPTION
[0033] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0035] Kubernetes (K8S for short) is a lightweight and scalable open source management platform for managing containerized applications and services. K8S can realize the automatic deployment and control of user applications or Pod tasks, and users can realize service discovery and load balancing based on K8S's own functions. Pod is the smallest scheduling unit in K8S. One or more containers can be defined in Pod. If there are multiple containers in a Pod, these multiple containers can share network and storage resources to complete a Pod task together. For example, Pod is equivalent to a logical host. When deploying the target service in the traditional way, it is usually deployed on a physical server or cloud server. In K8S, a Pod resource can be defined, and the target container can be defined on this Pod resource to realize the logical host task of Pod.
[0036] When a Pod accesses the external network, it needs to resolve the domain name through the Domain Name System (DNS) in the data center's intranet and obtain the Internet Protocol (IP) address of the external network. However, the operator used by DNS to obtain the external network IP address and the export operator used by the Pod to access the external network based on the external network IP address may be different, resulting in higher latency and poor stability when the Pod accesses the external network. To address this problem, an embodiment of the present disclosure provides an external network access method, which is described below in conjunction with a specific embodiment.
[0037] Figure 1 Flowchart of the external network access method provided by the embodiment of the present disclosure. The method is applied to the intranet of a data center, the intranet of the data center includes a container cluster management system, a first domain name system server, and a router, the container cluster management system includes a basic unit, that is, the Pod as described above, and the container cluster management system is located in the intranet of the data center. Figure 2As shown, the data center intranet includes terminal equipment, interface servers, Pods, first domain name system servers, routers, first export servers of operator A, first export servers of operator B, first export servers of operator C, first export servers of other operators, second export servers of operator A, second export servers of operator B, second export servers of operator C, and second export servers of other operators. Among them, the terminal equipment is a terminal equipment used by the intranet administrator of the data center, and the terminal equipment can specifically be a mobile phone, a laptop, a desktop, a tablet computer, etc. The interface server can specifically be a K8S application programming interface (Application Programming Interface, API) server (Server), which is used to manage Pods. Pod is a collection of one or more containerized applications. Containerized applications run on a host, and the host here can also be referred to as a server, a computing node, etc. One or more containerized applications can be run on a host, each host is a K8S node, and multiple hosts constitute a K8S cluster. The domain name system server in the data center intranet is recorded as the first domain name system server. The first export server of each operator can be a server, or multiple servers. Similarly, the second export server of each operator can be a server, or multiple servers. The first egress server and the second egress server of the same operator can be the same server or different servers. In addition, the first egress server and the second egress server of each operator are devices between the data center intranet and the public network, that is, one end of each egress server communicates with the device in the data center intranet, and the other end communicates with the device in the public network. In addition, if Figure 2 As shown, the public network includes the public DNS server of operator A, the public DNS server of operator B, the public DNS server of operator C, the public DNS servers of other operators, and the public server. Among them, the public DNS server of each operator is recorded as the second domain name system server. In addition, the second egress server of the same operator communicates with the public DNS server, for example, the second egress server of operator A communicates with the public DNS server of operator A.
[0038] The following is an introduction to the external network access method provided by the embodiment of the present disclosure with reference to the illustrations. Figure 1 As shown, the specific steps of this method are as follows:
[0039] S101. The basic unit sends a domain name resolution request to the first domain name system server, where the domain name resolution request includes a target domain name to be resolved and an Internet Protocol address of the basic unit.
[0040] like Figure 2As shown, when the Pod needs to access the external network, i.e., the public network, it first sends a domain name resolution request to the domain name system server in the data center intranet, i.e., the first domain name system server. The domain name resolution request includes the target domain name to be resolved and the Internet Protocol (IP) address of the Pod. Specifically, the IP address of the Pod can be used as the source IP address of the domain name resolution request.
[0041] S102: The first domain name system server determines a target operator corresponding to the Internet Protocol address of the basic unit, and obtains a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator.
[0042] When the first domain name system server receives the domain name resolution request, it determines the target operator corresponding to the source IP address according to the source IP address of the domain name resolution request. Assuming that the target operator corresponding to the source IP address is operator C, the first domain name system server obtains the target IP address corresponding to the target domain name through the second domain name system server provided by operator C, that is, the public network DNS server of operator C. For example, the first domain name system server sends the target domain name to the public network DNS server of operator C through the second egress server of operator C. When the public network DNS server of operator C receives the target domain name, it converts the target domain name into the corresponding target IP address, and returns the target IP address to the first domain name system server through the second egress server of operator C. That is, in the embodiment of the present disclosure, the resolution of the target domain name is a recursive resolution process.
[0043] S103. The basic unit receives the target Internet Protocol address from the first domain name system server.
[0044] After the first domain name system server receives the target IP address returned by the public DNS server of operator C, it returns the target IP address to the Pod, that is, the Pod receives the target IP address from the first domain name system server.
[0045] S104: The basic unit sends an access request to the router, where the access request includes the target Internet Protocol address and the Internet Protocol address of the basic unit.
[0046] For example, after the Pod receives the target IP address from the first domain name system server, it initiates an access request according to the target IP address. Specifically, the Pod sends the access request to a router in the data center intranet. The access request includes the target IP address and the IP address of the Pod, wherein the target IP address is the destination IP address of the access request and the IP address of the Pod is the source IP address of the access request.
[0047] S105. The router determines a target operator corresponding to the Internet Protocol address of the basic unit, and forwards the access request to a first egress server provided by the target operator, where the first egress server is used to forward the access request to a public network server provided by the target operator.
[0048] When the router receives the access request, it determines the target operator corresponding to the source IP address according to the source IP address of the access request. In this embodiment, the target operators corresponding to the same source IP address are the same, so the target operator determined by the router is also operator C. Further, the router sends the access request to the first egress server provided by operator C, that is, Figure 2 The first egress server of operator C shown in FIG. 1 further forwards the access request to the public network server provided by operator C. Thus, the Pod can access the public network server, that is, the external network.
[0049] The disclosed embodiment determines the target operator corresponding to the Pod according to the IP address of the Pod through the first domain name system server and the router in the intranet of the data center, so that when the first domain name system server receives the domain name resolution request of the Pod, it obtains the target IP address corresponding to the target domain name through the second domain name system server provided by the target operator. When the router receives the access request of the Pod for the target IP address, it sends an access request to the first export server provided by the target operator, so that the operator used by the first domain name system server to obtain the external network IP address, that is, the target IP address, and the export operator used by the Pod to access the external network according to the external network IP address are the same. This reduces the delay when the Pod accesses the external network and improves the stability of the Pod's access to the external network.
[0050] Optionally, the data center intranet also includes an interface server, and the method also includes: the first domain name system server and the router respectively obtain the metadata of all basic units managed by the interface server, and the metadata of each basic unit includes the Internet Protocol address and operator information corresponding to each basic unit.
[0051] In the disclosed embodiment, the interface server is used to manage Pods. Therefore, the interface server stores the meta information of all Pods. The meta information of each Pod includes the IP address and operator information corresponding to the Pod, such as the operator name or identifier. Specifically, the IP address corresponding to the Pod is an intranet address. In some embodiments, Pods can be created according to the needs of the intranet administrator of the data center, for example Figure 2As shown, the terminal device sends a creation request to the interface server, and the creation request includes the meta information of the Pod to be created, and the meta information includes the relevant information of the operator specified by the administrator for the Pod, such as the operator name or identifier. Specifically, the meta information of the Pod can be described by another markup language (YAML Ain't MarkupLanguage, YAML).
[0052] When the interface server receives the creation request, it creates the corresponding Pod and stores the metadata of the Pod locally. Since the interface server stores the metadata of all the Pods it manages, the first domain name system server can send a listening request to the interface server, so that the interface server sends the metadata of all the Pods it manages to the first domain name system server. The first domain name system server can store the metadata of all the Pods locally. Similarly, the router can send a listening request to the interface server, so that the interface server sends the metadata of all the Pods it manages to the router, and the router can store the metadata of all the Pods locally.
[0053] Optionally, the method also includes: the first domain name system server and the router respectively receive update information sent by the interface server, the update information including metadata of the basic unit that has been updated; the first domain name system server and the router respectively update the metadata of the basic unit stored locally according to the update information.
[0054] For example, when any Pod managed by the interface server is updated, the interface server may also send update information to the first domain name system server and the router respectively, and the update information includes the meta information of the updated Pod. When the first domain name system server receives the update information, it updates the meta information of the locally stored Pod according to the update information, so that the meta information of each Pod locally stored by the first domain name system server is the latest information. Similarly, when the router receives the update information, it updates the meta information of the locally stored Pod according to the update information, so that the meta information of each Pod locally stored by the router is the latest information.
[0055] Correspondingly, determining the target operator corresponding to the Internet Protocol address of the basic unit includes: retrieving the meta information of the basic unit from the meta information of all the basic units according to the Internet Protocol address of the basic unit; and determining the target operator corresponding to the Internet Protocol address of the basic unit according to the meta information of the basic unit.
[0056] For example, when the first domain name system server receives a domain name resolution request sent by a Pod, the meta information of the Pod is retrieved from the meta information of all Pods stored locally according to the IP address of the Pod included in the domain name resolution request. Further, the operator information corresponding to the IP address of the Pod is extracted from the meta information of the Pod, for example, the operator name or identifier, and the operator corresponding to the operator name or identifier is the target operator corresponding to the IP address of the Pod.
[0057] Optionally, obtaining a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator includes: sending the target domain name to be resolved to a second egress server provided by the target operator, the second egress server being used to send the target domain name to be resolved to a second domain name system server provided by the target operator, the second domain name system server being used to return the target Internet Protocol address corresponding to the target domain name to the second egress server; and receiving the target Internet Protocol address from the second egress server.
[0058] For example, when the first domain name system server determines that the target operator corresponding to the IP address of the Pod is operator C, it sends the target domain name to be resolved to the second egress server of operator C, and the second egress server of operator C further sends the target domain name to be resolved to the public DNS server of operator C. When the public DNS server of operator C receives the target domain name, it converts the target domain name into the corresponding target IP address and returns the target IP address to the second egress server of operator C. The second egress server of operator C returns the target IP address to the first domain name system server, that is, the first domain name system server receives the target IP address from the second egress server of operator C.
[0059] For example, after the Pod receives the target IP address from the first domain name system server, it initiates an access request according to the target IP address. Specifically, the Pod sends the access request to a router in the data center intranet. The access request includes the target IP address and the IP address of the Pod, wherein the target IP address is the destination IP address of the access request and the IP address of the Pod is the source IP address of the access request.
[0060] When the router receives the access request, it determines the target operator corresponding to the IP address of the Pod based on the IP address of the Pod in the access request. For example, the router retrieves the meta information of the Pod from the meta information of all Pods stored locally based on the IP address of the Pod. Further, the operator information corresponding to the IP address of the Pod is extracted from the meta information of the Pod, such as the operator name or logo. The operator corresponding to the operator name or logo is the target operator corresponding to the IP address of the Pod. Assume that the target operator determined by the router is also operator C.
[0061] The router sends the access request to the first egress server provided by operator C, that is, Figure 2 The first egress server of operator C shown in FIG. 1 further forwards the access request to the public network server provided by operator C. Thus, the Pod can access the public network server, that is, the external network.
[0062] Optionally, the Internet Protocol address of the basic unit is a source Internet Protocol address of the access request, and the first egress server is used to convert the source Internet Protocol address into the Internet Protocol address of the first egress server.
[0063] For example, the access request includes a target IP address and an IP address of a Pod, wherein the target IP address is the destination IP address of the access request, and the IP address of the Pod is the source IP address of the access request. When the first egress server of operator C receives the access request, the source IP address of the access request can be modified so that the source IP address of the access request is changed to the IP address of the first egress server of operator C, that is, the first egress server of operator C can implement the Source Network Address Translation (SNAT) service. Similarly, the second egress servers of each operator can also implement the SNAT service, and the specific process will not be repeated here.
[0064] Figure 3 This is a flow chart of an external network access method provided by another embodiment of the present disclosure. The specific steps of the method are as follows:
[0065] 1. The terminal device sends a creation request to the interface server.
[0066] 2. The interface server creates a Pod.
[0067] 3. The first domain name system server and the router send a monitoring request to the interface server.
[0068] 4. The interface server sends the meta information or update information of all Pods to the first domain name system server and router.
[0069] 5. Pod sends a domain name resolution request to the first domain name system server.
[0070] 6. The first domain name system server determines the operator C corresponding to the Pod and sends the target domain name to the second egress server of operator C.
[0071] 7. The second egress server of operator C sends the target domain name to the public DNS server of operator C.
[0072] 8. The public DNS server of operator C returns the target IP address to the second egress server of operator C.
[0073] 9. The second egress server of operator C returns the target IP address to the first domain name system server.
[0074] 10. The first DNS server returns the target IP address to the Pod.
[0075] 11. The Pod sends an access request to the router.
[0076] 12. The router determines the carrier C corresponding to the Pod and sends an access request to the first egress server of carrier C.
[0077] 13. The first egress server of operator C sends an access request to the public network server of operator C.
[0078] The specific principles and implementation methods of the above steps 1 to 13 are consistent with those described in the above embodiment and will not be repeated here.
[0079] Figure 4 The schematic diagram of the structure of the external network access device provided in the embodiment of the present disclosure. The external network access device is configured as a basic unit in the container cluster management system, and the container cluster management system is located in the intranet of the data center. The external network access device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the external network access method, such as Figure 4 As shown, the external network access device 60 includes:
[0080] A sending module 61 is used to send a domain name resolution request to a first domain name system server in the intranet of the data center, wherein the domain name resolution request includes a target domain name to be resolved and an Internet Protocol address of the basic unit, and the first domain name system server is used to determine a target operator corresponding to the Internet Protocol address of the basic unit, and obtain a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator;
[0081] A receiving module 62, configured to receive the target Internet Protocol address from the first domain name system server;
[0082] The sending module 61 is further used to: send an access request to a router in the data center intranet, the access request including the target Internet Protocol address and the Internet Protocol address of the basic unit, the router is used to determine the target operator corresponding to the Internet Protocol address of the basic unit, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0083] Figure 4 The external network access device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0084] Figure 5 The schematic diagram of the structure of the external network access device provided in the embodiment of the present disclosure. The external network access device is configured in the first domain name system server in the intranet of the data center. The external network access device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the external network access method, such as Figure 5 As shown, the external network access device 70 includes:
[0085] A receiving module 71 is used to receive a domain name resolution request sent by any basic unit in the container cluster management system, wherein the domain name resolution request includes a target domain name to be resolved and an Internet protocol address of any basic unit, and the container cluster management system is located in the intranet of the data center;
[0086] A determination module 72, configured to determine a target operator corresponding to the Internet Protocol address of any one of the basic units;
[0087] An acquisition module 73, configured to acquire a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator;
[0088] The sending module 74 is used to send the target Internet Protocol address to any of the basic units.
[0089] Optionally, the acquisition module 73 is further used to acquire the meta-information of all basic units managed by the interface server in the intranet of the data center, the meta-information of each basic unit including the Internet Protocol address and operator information corresponding to the basic unit; accordingly, when the determination module 72 determines the target operator corresponding to the Internet Protocol address of any basic unit, it is specifically used to: retrieve the meta-information of any basic unit from the meta-information of all basic units according to the Internet Protocol address of any basic unit; and determine the target operator corresponding to the Internet Protocol address of any basic unit according to the meta-information of any basic unit.
[0090] Optionally, the receiving module 71 is also used to: receive update information sent by the interface server, the update information including metadata of the updated basic unit; the external network access device 70 also includes: an update module 75, which is used to update the metadata of the locally stored basic unit according to the update information.
[0091] Optionally, when the acquisition module 73 acquires the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator, it is specifically used to: send the target domain name to be resolved to the second export server provided by the target operator, the second export server is used to send the target domain name to be resolved to the second domain name system server provided by the target operator, the second domain name system server is used to return the target Internet Protocol address corresponding to the target domain name to the second export server; receive the target Internet Protocol address from the second export server.
[0092] Figure 5 The external network access device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0093] Figure 6 The schematic diagram of the structure of the external network access device provided in the embodiment of the present disclosure. The external network access device is configured in a router in the intranet of a data center. The external network access device provided in the embodiment of the present disclosure can execute the processing flow provided in the embodiment of the external network access method, such as Figure 6 As shown, the external network access device 80 includes:
[0094] A receiving module 81 is used to receive an access request sent by any basic unit in a container cluster management system, wherein the access request includes a target Internet Protocol address and an Internet Protocol address of any basic unit, and the container cluster management system is located in the intranet of the data center;
[0095] A determination module 82, configured to determine a target operator corresponding to the Internet Protocol address of any one of the basic units;
[0096] The sending module 83 is used to forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0097] Optionally, the external network access device 80 also includes an acquisition module 84, which is used to obtain the meta-information of all basic units managed by the interface server in the data center intranet, and the meta-information of each basic unit includes the Internet Protocol address and operator information corresponding to the basic unit; when the determination module 82 determines the target operator corresponding to the Internet Protocol address of any basic unit, it is specifically used to: retrieve the meta-information of any basic unit from the meta-information of all basic units according to the Internet Protocol address of any basic unit; and determine the target operator corresponding to the Internet Protocol address of any basic unit according to the meta-information of any basic unit.
[0098] Optionally, the receiving module 81 is also used to: receive update information sent by the interface server, the update information including metadata of the updated basic unit; the external network access device 80 also includes an update module 85, which is used to update the metadata of the locally stored basic unit according to the update information.
[0099] Figure 6 The external network access device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0100] In addition, an embodiment of the present disclosure further provides a data center intranet, which includes a container cluster management system, a first domain name system server, and a router, and the container cluster management system includes a basic unit.
[0101] The basic unit is used to send a domain name resolution request to the first domain name system server, and the domain name resolution request includes a target domain name to be resolved and an Internet Protocol address of the basic unit.
[0102] The first domain name system server is used to determine the target operator corresponding to the Internet Protocol address of the basic unit, and obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator.
[0103] The basic unit is used to receive the target Internet Protocol address from the first domain name system server and send an access request to the router, wherein the access request includes the target Internet Protocol address and the Internet Protocol address of the basic unit.
[0104] The router is used to determine the target operator corresponding to the Internet Protocol address of the basic unit, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
[0105] Optionally, the data center intranet further includes an interface server, and the first domain name system server is further used to obtain meta information of all basic units managed by the interface server, and the meta information of each basic unit includes an Internet Protocol address and operator information corresponding to each basic unit. The router is further used to obtain meta information of all basic units managed by the interface server in the data center intranet, and the meta information of each basic unit includes an Internet Protocol address and operator information corresponding to each basic unit.
[0106] Optionally, when determining the target operator corresponding to the Internet Protocol address of the basic unit, the first domain name system server is specifically used to: retrieve the meta-information of the basic unit from the meta-information of all the basic units according to the Internet Protocol address of the basic unit; and determine the target operator corresponding to the Internet Protocol address of the basic unit according to the meta-information of the basic unit.
[0107] Optionally, when determining the target operator corresponding to the Internet Protocol address of the basic unit, the router is specifically used to: retrieve the meta-information of the basic unit from the meta-information of all the basic units according to the Internet Protocol address of the basic unit; and determine the target operator corresponding to the Internet Protocol address of the basic unit according to the meta-information of the basic unit.
[0108] Optionally, the first domain name system server is further used to receive update information sent by the interface server, the update information including meta information of the basic unit that has been updated; and update the meta information of the basic unit stored locally according to the update information. The router is further used to receive update information sent by the interface server, the update information including meta information of the basic unit that has been updated; and update the meta information of the basic unit stored locally according to the update information.
[0109] Optionally, when the first domain name system server obtains the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator, it is specifically used to: send the target domain name to be resolved to the second export server provided by the target operator, the second export server is used to send the target domain name to be resolved to the second domain name system server provided by the target operator, the second domain name system server is used to return the target Internet Protocol address corresponding to the target domain name to the second export server; receive the target Internet Protocol address from the second export server.
[0110] Optionally, the Internet Protocol address of the basic unit is a source Internet Protocol address of the access request, and the first egress server is used to convert the source Internet Protocol address into the Internet Protocol address of the first egress server.
[0111] The internal functions and structure of the external network access device are described above. The device can be implemented as an electronic device. Figure 7 This is a schematic diagram of the structure of an electronic device embodiment provided by the present disclosure. Figure 7 As shown, the electronic device includes a memory 91 and a processor 92 .
[0112] The memory 91 is used to store programs. In addition to the above-mentioned programs, the memory 91 can also be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0113] The memory 91 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0114] The processor 92 is coupled to the memory 91 and executes the program stored in the memory 91 to implement the technical solution of the above method embodiment.
[0115] Further, if Figure 7 As shown, the electronic device may also include: a communication component 93, a power component 94, an audio component 95, a display 96 and other components. Figure 7 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 7 Components shown.
[0116] The communication component 93 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 93 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 93 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0117] The power supply component 94 provides power to various components of the electronic device. The power supply component 94 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0118] The audio component 95 is configured to output and / or input audio signals. For example, the audio component 95 includes a microphone (MIC), and when the electronic device is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 91 or sent via the communication component 93. In some embodiments, the audio component 95 also includes a speaker for outputting audio signals.
[0119] The display 96 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0120] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the method described in the above embodiment.
[0121] The exemplary embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to enable the computer to implement the method described in the above embodiments.
[0122] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0123] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for accessing an external network, wherein: The method is applied to a data center intranet, the data center intranet includes a container cluster management system, a first domain name system server, and a router, the container cluster management system includes a basic unit, and the method includes: The basic unit sends a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved and an Internet Protocol address of the basic unit; The first domain name system server determines a target operator corresponding to the Internet Protocol address of the basic unit, and obtains a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator; The base unit receives the target Internet Protocol address from the first domain name system server; The basic unit sends an access request to the router, wherein the access request includes the target Internet Protocol address and the Internet Protocol address of the basic unit; The router determines the target operator corresponding to the Internet Protocol address of the basic unit, and forwards the access request to a first egress server provided by the target operator, where the first egress server is used to forward the access request to a public network server provided by the target operator.
2. The method according to claim 1, wherein: The data center intranet also includes an interface server, and the method further includes: The first domain name system server and the router respectively obtain the meta information of all basic units managed by the interface server in the data center intranet, and the meta information of each basic unit includes the Internet Protocol address and operator information corresponding to each basic unit.
3. The method according to claim 2, wherein: Determining a target operator corresponding to the Internet Protocol address of the basic unit includes: Retrieving the meta information of the basic unit from the meta information of all the basic units according to the Internet Protocol address of the basic unit; A target operator corresponding to the Internet Protocol address of the basic unit is determined according to the meta-information of the basic unit.
4. The method according to claim 2, wherein: The method further comprises: The first domain name system server and the router respectively receive update information sent by the interface server, wherein the update information includes meta information of the basic unit where the update occurs; The first domain name system server and the router respectively update the meta information of the basic unit stored locally according to the update information.
5. The method according to claim 1, wherein: Acquiring a target Internet Protocol address corresponding to the target domain name through a second domain name system server provided by the target operator includes: Sending the target domain name to be resolved to a second egress server provided by the target operator, where the second egress server is used to send the target domain name to be resolved to a second domain name system server provided by the target operator, where the second domain name system server is used to return a target Internet Protocol address corresponding to the target domain name to the second egress server; The target Internet Protocol address is received from the second egress server.
6. The method according to claim 1, wherein: The Internet Protocol address of the basic unit is a source Internet Protocol address of the access request, and the first egress server is used to convert the source Internet Protocol address into the Internet Protocol address of the first egress server.
7. A data center intranet, wherein: The data center intranet includes a container cluster management system, a first domain name system server, and a router, and the container cluster management system includes a basic unit; The basic unit is used to send a domain name resolution request to the first domain name system server, wherein the domain name resolution request includes a target domain name to be resolved and an Internet Protocol address of the basic unit; The first domain name system server is used to determine the target operator corresponding to the Internet Protocol address of the basic unit, and obtain the target Internet Protocol address corresponding to the target domain name through the second domain name system server provided by the target operator; The basic unit is used to receive the target Internet Protocol address from the first domain name system server and send an access request to the router, wherein the access request includes the target Internet Protocol address and the Internet Protocol address of the basic unit; The router is used to determine the target operator corresponding to the Internet Protocol address of the basic unit, and forward the access request to a first egress server provided by the target operator, and the first egress server is used to forward the access request to a public network server provided by the target operator.
8. An electronic device, wherein: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.