WO2023134066A1 - 虚拟私有云服务的访问方法、装置、设备及存储介质 - Google Patents

虚拟私有云服务的访问方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023134066A1
WO2023134066A1 PCT/CN2022/089868 CN2022089868W WO2023134066A1 WO 2023134066 A1 WO2023134066 A1 WO 2023134066A1 CN 2022089868 W CN2022089868 W CN 2022089868W WO 2023134066 A1 WO2023134066 A1 WO 2023134066A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
private cloud
virtual private
accessed
access
Prior art date
Application number
PCT/CN2022/089868
Other languages
English (en)
French (fr)
Inventor
王艳
孟宪宇
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023134066A1 publication Critical patent/WO2023134066A1/zh

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/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • 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
    • 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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Definitions

  • the present invention relates to the technical field of data processing, and in particular to an access method, device, equipment and computer-readable storage medium for a virtual private cloud service.
  • the main purpose of the present invention is to provide a virtual private cloud service access method, device, equipment and computer-readable storage medium, aiming at solving the technical problem that services in different virtual private clouds cannot be accessed due to virtual private cloud isolation.
  • the present invention provides a method for accessing a virtual private cloud service.
  • the method for accessing a virtual private cloud service includes: accessing a target service through a virtual firewall component and a first address mapping in the virtual firewall component, And access the interface service based on the target service, wherein the first address mapping is a mapping between the virtual private cloud IP of the accessed virtual private cloud service and the IP of the host machine to which the interface service belongs; through the interface service Determine the service IP of the accessed virtual private cloud service, and forward the access request to the accessed virtual private cloud service according to the service IP.
  • the present invention also provides a device for accessing virtual private cloud services.
  • the device for accessing virtual private cloud services includes: an interface service access module for passing through the virtual firewall component and the virtual firewall component. The first address mapping, accessing the target service, and accessing the interface service based on the target service, wherein the first address mapping is the virtual private cloud IP of the accessed virtual private cloud service and the IP of the host machine to which the interface service belongs Mapping between them; an access request forwarding module, configured to determine the service IP of the accessed virtual private cloud service through the interface service, and forward the access request to the accessed virtual private cloud service according to the service IP.
  • the present invention also provides a virtual private cloud service access device
  • the virtual private cloud service access device includes a processor, a memory, and stored in the memory and can be used by the processor
  • the virtual private cloud service access program executed, wherein when the virtual private cloud service access program is executed by the processor, it realizes:
  • the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores the access program of the virtual private cloud service, wherein the access program of the virtual private cloud service is executed by the processor When executed, achieve:
  • the present invention provides a method for accessing a virtual private cloud service.
  • the method accesses a target service through a virtual firewall component and a first address mapping in the virtual firewall component, and accesses an interface service based on the target service, wherein the The first address mapping is a mapping between the virtual private cloud IP of the visited virtual private cloud service and the IP of the host machine to which the interface service belongs; the service IP of the visited virtual private cloud service is determined through the interface service, And forward the access request to the accessed virtual private cloud service according to the service IP.
  • the mutual access of isolated objects inside and outside the virtual private cloud can be realized, the problem of failure to access virtual private cloud services caused by the isolation of virtual private clouds can be avoided, and the access success of virtual private cloud services can be improved.
  • the efficiency is improved, the user experience is improved, and the technical problem of inaccessibility between services in different virtual private clouds caused by virtual private cloud isolation is solved.
  • FIG. 2 is a schematic flow diagram of a first embodiment of a method for accessing a virtual private cloud service according to the present invention
  • Fig. 3 is a schematic diagram of the access process of the virtual private cloud service of the present invention.
  • FIG. 4 is a schematic flowchart of a second embodiment of a method for accessing a virtual private cloud service according to the present invention
  • FIG. 5 is a schematic flowchart of a third embodiment of a method for accessing a virtual private cloud service according to the present invention.
  • the access method of the virtual private cloud service involved in the embodiment of the present invention is mainly applied to the access device of the virtual private cloud service, and the access device of the virtual private cloud service may be a device with display and processing functions such as a PC, a portable computer, and a mobile terminal.
  • FIG. 1 is a schematic diagram of the hardware structure of the access device of the virtual private cloud service involved in the solution of the embodiment of the present invention.
  • the access device of the virtual private cloud service may include a processor 1001 (such as a CPU), a communication bus 1002 , a user interface 1003 , a network interface 1004 , and a memory 1005 .
  • the communication bus 1002 is used to realize the connection and communication between these components;
  • the user interface 1003 can include a display screen (Display), an input unit such as a keyboard (Keyboard);
  • the network interface 1004 can optionally include a standard wired interface and a wireless interface (such as WI-FI interface);
  • the memory 1005 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 can optionally also be a storage device independent of the aforementioned processor 1001 .
  • Figure 1 does not constitute a limitation on the access device of the virtual private cloud service, and may include more or less components than those shown in the figure, or combine certain components, or be different layout of the components.
  • the memory 1005 as a computer-readable storage medium in FIG. 1 may include an operating system, a network communication module, and an access program for a virtual private cloud service.
  • the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the access program of the virtual private cloud service stored in the memory 1005, and execute the virtual private cloud provided by the embodiment of the present invention The access method for the service.
  • An embodiment of the present invention provides a virtual private cloud service access method.
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for accessing a virtual private cloud service according to the present invention.
  • the access method of the virtual private cloud service includes the following steps:
  • each pod located in the VPC network (the VPC network is defined as a business network) cannot directly access the pod located in the cloud management network (the host network of the K8S cluster node is defined as a cloud management network).
  • Domain name resolution service such as service discovery CoreDNS service or configuration control Ingress Controller service
  • vfw component being virtual firewall plug-in
  • pre-configuring address mapping in vfw realize thus Access across networks.
  • access types are divided into three types:
  • the access object outside the K8S cluster accesses the pod instance in the K8S cluster.
  • VPC1 and VPC2 belong to different VPCs of the same cluster, and the access object outside the cluster accesses the pod instance in the cluster.
  • the access object in this type needs to pass the corresponding service (Ingress Controller service), and add two address mappings in vfw (that is, the mapping between the external network IP and the VPC IP of the VPC pod, and the VPC IP of the accessed VPC pod and the user To obtain the mapping between the host IP of the service of the pod IP of the accessed object) to access;
  • the second is that pod instances in different VPCs in the K8S cluster access each other, such as the pod in VPC1 accessing the pod in VPC2 in Figure 3.
  • Access objects in this type need to pass the corresponding service (CoreDNS service), and add two address mappings in vfw (that is, the mapping between the VPC IP of the accessed VPC pod and the VOC IP to which the access object belongs, and the VPC of the accessed VPC pod The mapping between the IP and the host IP of the service (CoreDNS service) used to obtain the pod IP of the accessed object);
  • the third is that pod instances in the same VPC in the K8S cluster access each other, as shown in the figure below, a pod in VPC1 accesses another pod in VPC1.
  • Access objects in this type need to pass the corresponding service (CoreDNS service), and add an address mapping in vfw (that is, the VPC IP of the accessed VPC pod and the service (CoreDNS service) used to obtain the pod IP of the accessed object belong to Mapping between host IPs).
  • mapping between the VPC IP of the visited VPC pod and the IP of the host machine to which the interface service belongs is added in vfw, so that the interface service located in the cloud management network can be accessed, and the accessed interface service can be determined through the interface service The pod IP of the VPC pod.
  • Step S20 determine the service IP of the accessed virtual private cloud service through the interface service, and forward the access request to the accessed virtual private cloud service according to the service IP.
  • the cluster IP (that is, the Cluster IP) of the VPC pod is determined by obtaining the service domain name record in the Apiserver service, and the Cluster IP is returned to the VPC pod (the VPC Pod passes the K8S built-in IPTables Nat rule (used to realize the network address Conversion) Convert the Cluster IP to the pod IP, and forward the access corresponding to the pod IP to the backend Pod instance corresponding to the service.
  • the K8S built-in IPTables Nat rule used to realize the network address Conversion
  • the determining the service IP of the accessed virtual private cloud service through the interface service specifically includes:
  • a service domain name record is stored in the interface service, and the service domain name record includes each service and its corresponding cluster IP (Cluster IP).
  • Cluster IP cluster IP
  • the target cluster IP of the service to which the visited VPC pod belongs can be determined in the service domain name record, and recorded as the corresponding to the visited VPC pod The target cluster IP. Then convert the target cluster IP to the target pod IP through the K8S built-in IPTables Nat rule, that is, forward the access of the target Cluster IP to the backend pod instance corresponding to the service to which the accessed VPC pod belongs.
  • This embodiment provides a method for accessing a virtual private cloud service.
  • the method accesses a target service through a virtual firewall component and the first address mapping in the virtual firewall component, and accesses an interface service based on the target service, wherein,
  • the first address mapping is a mapping between the virtual private cloud IP of the accessed virtual private cloud service and the IP of the host machine to which the interface service belongs; the service IP of the accessed virtual private cloud service is determined through the interface service , and forward the access request to the accessed virtual private cloud service according to the service IP.
  • the mutual access of isolated objects inside and outside the virtual private cloud can be realized, the problem of failure to access virtual private cloud services caused by the isolation of virtual private clouds can be avoided, and the access success of virtual private cloud services can be improved.
  • the efficiency is improved, the user experience is improved, and the technical problem of inaccessibility between services in different virtual private clouds caused by virtual private cloud isolation is solved.
  • FIG. 4 is a schematic flowchart of a second embodiment of a method for accessing a virtual private cloud service according to the present invention.
  • the step S10 specifically includes:
  • Step S11 when the access object and the accessed virtual private cloud service do not belong to the same cluster, analyze the external domain name of the access object based on the external domain name resolution service, and determine the external network IP corresponding to the external domain name;
  • the access object may be at least one of a mobile terminal, a webpage, a terminal, and a client outside the cluster.
  • the commonly used Nginx is used as the Ingress Controller, and a set of Ingress Controllers is deployed for each VPC, and a unique Ingress Class name is specified based on the --ingress-class parameter, so that the Ingress Controller can be determined based on the ingress-class annotation in the Ingress.
  • Pre-configure in the Ingress Controller that is, point the Apiserver access to the cluster IP of the accessed VPC pod through the --kubeconfig parameter.
  • the external domain name of the access object is first resolved based on the external DNS, thereby determining the external network IP corresponding to the external domain name.
  • the external network IP After determining the external network IP, through the second address mapping between the VPC IP of the visited VPC pod and the external network IP configured in vfw (that is, accessing the VPC Ingress Controller IP through the vfw proxy external network IP), access The Ingress Controller service under the VPC network to which the accessed VPC pod belongs. Access the interface service corresponding to the visited VPC pod through the Ingress Controller service (that is, access the Apiserver service located in the host IP through the vfw proxy Ingress Controller service).
  • step S12 also includes:
  • the Ingress Controller service needs to access the URL of the access link corresponding to the accessed VPC pod (that is, the link for accessing the VPC pod from an external domain name, such as http://abc.com:80 /svc1) is compared with configuration rules (Ingress rules used to record each URL and corresponding service). And according to the comparison result, determine the service group of the service to which the visited VPC pod belongs.
  • the Ingress Controller service can determine the visited VPC pod in the Apiserver (that is, point to the proxy VPC IP configured in the -kubeconfig parameter) according to the service group of the service to which the visited VPC pod belongs. To forward the service traffic to the backend Pod instance corresponding to the Service (that is, the accessed VPC pod).
  • FIG. 5 is a schematic flowchart of a third embodiment of a method for accessing a virtual private cloud service according to the present invention.
  • the step S10 further includes:
  • Step S14 when the access object and the visited virtual private cloud service belong to the same cluster and belong to the same virtual private cloud, determine the visited virtual private cloud based on the service name corresponding to the visited virtual private cloud service the service corresponding to the service;
  • Step S15 accessing the virtual firewall component through the service corresponding to the accessed virtual private cloud service, and accessing the service discovery service through the first address mapping in the virtual firewall component;
  • Step S16 accessing the interface service corresponding to the accessed virtual private cloud service through the service discovery service.
  • the access object and the visited VPC pod belong to the same cluster and belong to the same VPC, based on the service name corresponding to the visited VPC pod, the service corresponding to the visited VPC pod can be determined. Because they belong to the same VPC network, there is no network isolation, so they can directly access the services corresponding to the visited VPC pod.
  • the CoreDNS service located in the host network, the CoreDNS service determines the cluster IP (that is, the Cluster IP) of the VPC pod by obtaining the service domain name record in the Apiserver service, and returns the Cluster IP to the VPC pod (the VPC Pod uses the K8S built-in IPTables Nat rule ( Used to implement network address translation) Convert the Cluster IP to the pod IP, and forward the access corresponding to the pod IP to the backend Pod instance corresponding to the service.
  • the cluster IP that is, the Cluster IP
  • the VPC Pod uses the K8S built-in IPTables Nat rule ( Used to implement network address translation) Convert the Cluster IP to the pod IP, and forward the access corresponding to the pod IP to the backend Pod instance corresponding to the service.
  • the step of accessing the virtual firewall component through the service corresponding to the accessed virtual private cloud service, and accessing the service discovery service through the first address mapping in the virtual firewall component it also includes:
  • the access object and the accessed virtual private cloud service belong to the same cluster but not to the same virtual private cloud
  • access the accessed virtual cloud service through the virtual firewall component and the third address mapping in the virtual firewall component
  • the step of accessing the virtual firewall component through the service corresponding to the accessed virtual private cloud service, and accessing the service discovery service through the first address mapping in the virtual firewall component it also includes:
  • dnsPolicy determines the default DNS configuration policy in the Pod (None means that there is no policy and depends on the dnsConfig configuration in the pod Spec; Default means that the DNS configuration of the pod is completely inherited from the node.), that is, the dnsPolicy in the VPC Pod Configure the default flag None, and set the nameservers in dnsConfig in the VPC Pod to point to the address mapping of CoreDNS.
  • the embodiment of the present invention also provides a virtual private cloud service access device.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of an access device for a virtual private cloud service according to the present invention.
  • the access device of the virtual private cloud service includes:
  • the interface service access module 10 is configured to access the target service through the virtual firewall component and the first address mapping in the virtual firewall component, and access the interface service based on the target service, wherein the first address mapping is accessed Mapping between the virtual private cloud IP of the virtual private cloud service and the IP of the host machine to which the interface service belongs;
  • the access request forwarding module 20 is configured to determine the service IP of the accessed virtual private cloud service through the interface service, and forward the access request to the accessed virtual private cloud service according to the service IP.
  • interface service access module 10 specifically includes:
  • the external domain name resolution unit is configured to resolve the external domain name of the accessed object based on the external domain name resolution service when the accessed object and the accessed virtual private cloud service do not belong to the same cluster, and determine the corresponding domain name of the external domain name Internet IP;
  • the control service access unit is configured to access the virtual firewall component through the service corresponding to the accessed virtual private cloud service, and access the corresponding configuration control service through the second address mapping in the virtual firewall component, wherein the The second address mapping is the mapping between the virtual private cloud IP of the accessed virtual private cloud service and the external network IP;
  • the first interface service access unit is configured to control the service through the configuration, and access the interface service corresponding to the accessed virtual private cloud service based on the virtual firewall and the first address mapping.
  • interface service access module 10 specifically further includes:
  • the first service confirmation unit is configured to obtain an access link for the access object to access the accessed virtual private cloud service, and compare the access link with a preset configuration rule through the configuration control service to determine the The service corresponding to the accessed virtual private cloud service.
  • interface service access module 10 specifically includes:
  • the second service confirmation unit is configured to, when the access object and the accessed virtual private cloud service belong to the same cluster and belong to the same virtual private cloud, based on the service name corresponding to the accessed virtual private cloud service, determine the The service corresponding to the accessed virtual private cloud service;
  • the discovery service access unit is configured to access the virtual firewall component through the service corresponding to the accessed virtual private cloud service, and access the service discovery service through the first address mapping in the virtual firewall component;
  • the second interface service access unit is configured to access the interface service corresponding to the accessed virtual private cloud service through the service discovery service.
  • interface service access module 10 specifically further includes:
  • the accessed service access module is configured to pass through the virtual firewall component and the third virtual firewall component when the accessed object and the accessed virtual private cloud service belong to the same cluster and do not belong to the same virtual private cloud.
  • Address mapping accessing the service corresponding to the visited virtual private cloud service, wherein the third address is mapped to the virtual private cloud IP of the virtual private cloud to which the access object belongs and the virtual private cloud IP address of the visited virtual private cloud service Mapping between cloud IPs.
  • interface service access module 10 specifically further includes:
  • access request forwarding module 20 is also specifically configured to:
  • the cluster IP determination module is configured to obtain a service domain name record through the interface service, and determine the IP address corresponding to the accessed virtual private cloud service in the service domain name record according to the service corresponding to the accessed virtual private cloud service.
  • Target cluster IP
  • each module in the above-mentioned virtual private cloud service access device corresponds to each step in the above-mentioned virtual private cloud service access method embodiment, and its functions and implementation processes will not be repeated here.
  • an embodiment of the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the access program of the virtual private cloud service is stored on the computer-readable storage medium of the present invention, wherein when the access program of the virtual private cloud service is executed by the processor, the steps of the access method for the above-mentioned virtual private cloud service are realized.
  • the method implemented when the access program of the virtual private cloud service is executed can refer to various embodiments of the access method of the virtual private cloud service of the present invention, which will not be repeated here.
  • the application can be used in numerous general purpose or special purpose computer system environments or configurations. Examples: personal computers, server computers, handheld or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, including A distributed computing environment for any of the above systems or devices, etc.
  • This application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer.
  • program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • the application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Abstract

本申请涉及人工智能,本申请提供一种虚拟私有云服务的访问方法、装置、设备及存储介质,通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。基于虚拟防火墙组件中的地址映射,实现虚拟私有云内外隔离对象的互访,避免因虚拟私有云的隔离导致访问虚拟私有云服务失败的问题,提高了虚拟私有云服务的访问成功率,提高了用户体验。

Description

虚拟私有云服务的访问方法、装置、设备及存储介质
本申请要求于2022年01月14日提交中国专利局、申请号为2022100441988,发明名称为“虚拟私有云服务的访问方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据处理技术领域,尤其涉及一种虚拟私有云服务的访问方法、装置、设备及计算机可读存储介质。
背景技术
基于虚拟私有云VPC(Virtual Private Cloud)进行租户隔离是云计算领域的通用手段。Kubernetes(简称K8S)作为基于容器的基础设施平台,用于多租户的共享使用。在Kubernetes集群中,Pod是所有业务类型的基础,也是K8S管理的最小单位级,是一个或多个容器的组合。在访问VPC中的服务(VPC pod)时,由于访问对象需要调用服务发现coreDNS服务或配置控制Ingress Controller服务访问被访问虚拟私有云服务VPC pod的接口服务,以确定被访问VPC pod对应的服务IP(pod IP)。但是,发明人意识到在访问对象与被访问虚拟私有云服务的接口服务之间存在隔离或访问对象没有访问权限(访问被访问虚拟私有云服务的接口服务的权限)时,会产生访问失败的问题。
发明内容
本发明的主要目的在于提供一种虚拟私有云服务的访问方法、装置、设备及计算机可读存储介质,旨在解决虚拟私有云隔离导致不同虚拟私有云中的服务之间无法访问的技术问题。
为实现上述目的,本发明提供一种虚拟私有云服务的访问方法,所述虚拟私有云服务的访问方法包括:通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
此外,为实现上述目的,本发明还提供一种虚拟私有云服务的访问装置,所述虚拟私有云服务的访问装置包括:接口服务访问模块,用于通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;访问请求转发模块,用于通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
此外,为实现上述目的,本发明还提供一种虚拟私有云服务的访问设备,所述虚拟私有云服务的访问设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的虚拟私有云服务的访问程序,其中所述虚拟私有云服务的访问程序被所述处理器执行时,实现:
通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将 访问请求转发至所述被访问虚拟私有云服务。
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有虚拟私有云服务的访问程序,其中所述虚拟私有云服务的访问程序被处理器执行时,实现:
通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
本发明提供一种虚拟私有云服务的访问方法,所述方法通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。通过上述方式,基于虚拟防火墙组件中的地址映射,实现虚拟私有云内外隔离对象的互访,避免因虚拟私有云的隔离导致访问虚拟私有云服务失败的问题,提高了虚拟私有云服务的访问成功率,提高了用户体验,解决了虚拟私有云隔离导致不同虚拟私有云中的服务之间无法访问的技术问题。
附图说明
图1为本发明实施例方案中涉及的虚拟私有云服务的访问设备的硬件结构示意图;
图2为本发明虚拟私有云服务的访问方法第一实施例的流程示意图;
图3为本发明虚拟私有云服务的访问过程示意图;
图4为本发明虚拟私有云服务的访问方法第二实施例的流程示意图;
图5为本发明虚拟私有云服务的访问方法第三实施例的流程示意图;
图6为本发明虚拟私有云服务的访问装置第一实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例涉及的虚拟私有云服务的访问方法主要应用于虚拟私有云服务的访问设备,该虚拟私有云服务的访问设备可以是PC、便携计算机、移动终端等具有显示和处理功能的设备。
参照图1,图1为本发明实施例方案中涉及的虚拟私有云服务的访问设备的硬件结构示意图。本发明实施例中,虚拟私有云服务的访问设备可以包括处理器1001(例如CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的硬件结构并不构成对虚拟私有云服务的访问设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
继续参照图1,图1中作为一种计算机可读存储介质的存储器1005可以包括操作系统、网络通信模块以及虚拟私有云服务的访问程序。
在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的虚拟私有云服务的访问程序,并执行本发明实施例提供的虚拟私有云服务的访问方法。
本发明实施例提供了一种虚拟私有云服务的访问方法。
参照图2,图2为本发明虚拟私有云服务的访问方法第一实施例的流程示意图。
本实施例中,所述虚拟私有云服务的访问方法包括以下步骤:
步骤S10,通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
在基于VPC隔离的K8S集群网络环境下,由于位于VPC网络(VPC网络定义为业务网络)中的各个pod不能直接访问位于云管网络(K8S集群节点的宿主机网络定义为云管网络)中的域名解析服务(如服务发现CoreDNS服务或配置控制Ingress Controller服务),因此,本实施例中,通过增加虚拟防火墙组件vfw组件(即虚拟防火墙插件),并在vfw中预先配置地址映射,由此实现跨网络访问。
本实施例中,访问类型分为三种:
第一种是K8S集群外的访问对象访问K8S集群内的pod实例,如图3中,VPC1与VPC2属于同一集群不同VPC,该集群外的访问对象访问该集群内的pod实例。该类型中的访问对象需要通过对应服务(Ingress Controller服务),并在vfw中增加两种地址映射(即外网IP与VPC pod的VPC IP之间的映射以及被访问VPC pod的VPC IP与用于获取被访问对象的pod IP的服务所属宿主机IP之间的映射)进行访问;
第二种是K8S集群内的不同VPC内的pod实例互相访问,如图3中VPC1中的pod访问VPC2中的pod。该类型中的访问对象需要通过对应服务(CoreDNS服务),并在vfw中增加两种地址映射(即被访问VPC pod的VPC IP与访问对象所属VOC IP之间的映射以及被访问VPC pod的VPC IP与用于获取被访问对象的pod IP的服务(CoreDNS服务)所属宿主机IP之间的映射);
第三种是K8S集群内的同一VPC内的pod实例互相访问,如下图中VPC1中的pod访问VPC1中的另外pod。该类型中的访问对象需要通过对应服务(CoreDNS服务),并在vfw中增加一种地址映射(即被访问VPC pod的VPC IP与用于获取被访问对象的pod IP的服务(CoreDNS服务)所属宿主机IP之间的映射)。
具体地,在vfw中增加被访问VPC pod的VPC IP与所述接口服务所属宿主机的IP之间的映射,即可访问位于云管网络中的接口服务,以通过所述接口服务确定被访问VPC pod的pod IP。
步骤S20,通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
本实施例中,通过获取Apiserver服务中的服务域名记录确定VPC pod的集群IP(即Cluster IP),并将Cluster IP返回至VPC pod(VPC Pod通过K8S内置的IPTables Nat规则(用于实现网络地址转换)将Cluster IP转换为pod IP,并将pod IP对应的访问转发给服务对应的后端Pod实例。
进一步地,所述通过所述接口服务确定所述被访问虚拟私有云服务的服务IP具体包括:
通过所述接口服务获取服务域名记录,并在所述服务域名记录中,根据所述被访问虚拟私有云服务对应的服务,确定所述被访问虚拟私有云服务对应的目标集群IP;
根据预设规则,将所述目标集群IP转换为所述目标服务IP。
本实施例中,接口服务中存储有服务域名记录,服务域名记录中包括各个服务及其对应的集群IP(Cluster IP)。通过所述被访问VPC pod对应的服务(即所述被访问VPC pod所属服务),即可在服务域名记录中确定被访问VPC pod所属服务的目标集群IP,记为所述被访问VPC pod对应的目标集群IP。然后通过K8S内置的IPTables Nat规则将所述目标集群IP转换为所述目标pod IP,即将目标Cluster IP的访问转发给被访问VPC pod所属服务对应的后端pod实例。
本实施例提供一种虚拟私有云服务的访问方法,所述方法通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。通过上述方式,基于虚拟防火墙组件中的地址映射,实现虚拟私有云内外隔离对象的互访,避免因虚拟私有云的隔离导致访问虚拟私有云服务失败的问题,提高了虚拟私有云服务的访问成功率,提高了用户体验,解决了虚拟私有云隔离导致不同虚拟私有云中的服务之间无法访问的技术问题。
参照图4,图4为本发明虚拟私有云服务的访问方法第二实施例的流程示意图。
基于上述图2所示实施例,本实施例中,所述步骤S10具体包括:
步骤S11,在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP;
步骤S12,通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第二地址映射,访问对应配置控制服务,其中,所述第二地址映射为所述被访问虚拟私有云服务的虚拟私有云IP与所述外网IP之间的映射;
步骤S13,通过所述配置控制服务,并基于所述虚拟防火墙以及所述第一地址映射,访问所述被访问虚拟私有云服务对应的接口服务。
本实施例中,访问对象可以是集群外的移动端、网页、终端、客户端中的至少一种。采用常用的Nginx作为Ingress Controller,且每个VPC分别部署一套Ingress Controller,并基于--ingress-class参数指定唯一的Ingress Class名,从而在Ingress中可基于ingress-class annotation确定Ingress Controller。
预先在Ingress Controller中进行配置,即通过--kubeconfig参数将Apiserver访问指向被访问VPC pod的集群IP。
然后在检测到集群外的访问对象对集群内的VPC pod进行访问时,首先基于外部DNS对访问对象的外部域名进行解析,由此确定所述外部域名对应的外网IP。在确定外网IP后,通过vfw中配置的所述被访问VPC pod的VPC IP与所述外网IP之间的第二地址映射(即通过vfw代理外网IP访问VPC Ingress Controller IP),访问被访问VPC pod所属VPC网络下的Ingress Controller服务。以通过Ingress Controller服务访问所述被访问VPC pod对应的接口服务(即通过vfw代理Ingress Controller服务访问位于宿主机IP的Apiserver服务)。
进一步地,所述步骤S12还包括:
获取所述访问对象访问所述被访问虚拟私有云服务的访问链接,通过所述配置控制服务将所述访问链接与预设配置规则进行比对,以确定所述被访问虚拟私有云服务对应的服务。
本实施例中,由于一个集群中存在多个服务,因此Ingress Controller服务需将访问被访问VPC pod对应的访问链接URL(即外部域名访问VPC pod的链接,如http://abc.com:80/svc1)与配置规则(用于记载各URL与对应服务的Ingress规则)进行比对。并根据比对结果,确定所述被访问VPC pod所属服务的服务分组。Ingress Controller 服务可根据所述被访问VPC pod所属服务的服务分组在Apiserver中(即指向—kubeconfig参数中配置的代理VPC IP)确定所述被访问VPC pod。以将服务流量转发到Service对应的后端Pod实例(即被访问VPC pod)。
参照图5,图5为本发明虚拟私有云服务的访问方法第三实施例的流程示意图。
基于上述图2所示实施例,本实施例中,所述步骤S10还包括:
步骤S14,在所述访问对象与所述被访问虚拟私有云服务属于同一集群且属于同一虚拟私有云时,基于所述被访问虚拟私有云服务对应的服务名,确定所述被访问虚拟私有云服务对应的服务;
步骤S15,通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务;
步骤S16,通过所述服务发现服务访问所述被访问虚拟私有云服务对应的接口服务。
本实施例中,预先进行配置,K8S集群全局部署一套CoreDNS服务,且所述CoreDNS服务在K8S中以HostNetwork模式部署,在vfw映射CoreDNS服务所属宿主机IP与所述被访问VPC pod的VPC IP访问,以通过CoreDNS服务解析出被访问VPC pod的pod IP,其中,每个VPC(VPC pod的VPC IP)映射一个宿主机IP(即CoreDNS服务所属宿主机IP),以现跨宿主机云管网络和业务VPC网络平面的服务访问。
在所述访问对象与所述被访问VPC pod属于同一集群且属于同一VPC时,基于所述被访问VPC pod对应的服务名,即可确定所述被访问VPC pod对应的服务。由于属于同一VPC网络,不存在网络隔离,因此可直接访问被访问VPC pod对应的服务。然后根据被访问VPC pod中配置的nameserver进行服务域名解析(即指向CoreDNS服务),具体通过vfw代理(基于被访问VPC pod的VPC IP与所述接口服务所属宿主机的IP之间的映射)访问位于宿主机网络的CoreDNS服务,CoreDNS服务通过获取Apiserver服务中的服务域名记录确定VPC pod的集群IP(即Cluster IP),并将Cluster IP返回至VPC pod(VPC Pod通过K8S内置的IPTables Nat规则(用于实现网络地址转换)将Cluster IP转换为pod IP,并将pod IP对应的访问转发给服务对应的后端Pod实例。
进一步地,所述通所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务的步骤之前,还包括:
在所述访问对象与所述被访问虚拟私有云服务属于同一集群且不属于同一虚拟私有云时,通过所述虚拟防火墙组件以及所述虚拟防火墙组件中的第三地址映射,访问所述被访问虚拟私有云服务对应的服务,其中,所述第三地址映射为所述访问对象所属虚拟私有云的虚拟私有云IP与所述被访问虚拟私有云服务的虚拟私有云IP之间的映射。
本实施例中,在所述访问对象与所述被访问VPC pod属于同一集群且不属于同一VPC时,需要在所述虚拟防火墙组件中增加所述访问对象所属VPC的VPC IP与所述被访问VPC pod的VPC IP之间的映射,以实现跨网络服务访问。
进一步地,所述通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务的步骤之前,还包括:
将所述被访问虚拟私有云服务对应的预设外部域名解析策略的标志设置为预设标志,并在所述外部域名解析配置中的外部域名解析服务器中添加访问服务发现服务以及对应地址映射。
本实施例中,dnsPolicy决定Pod内预设DNS配置策略(None表示无任何策略,并取决于pod Spec中的dnsConfig配置;Default表示pod之DNS配置完全从节点继承。),即将VPC Pod中的dnsPolicy配置为预设标志None,并将VPC Pod中dnsConfig中的nameservers设置为指向CoreDNS的地址映射。
此外,本发明实施例还提供一种虚拟私有云服务的访问装置。
参照图6,图6为本发明虚拟私有云服务的访问装置第一实施例的功能模块示意图。
本实施例中,所述虚拟私有云服务的访问装置包括:
接口服务访问模块10,用于通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
访问请求转发模块20,用于通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
进一步地,所述接口服务访问模块10具体包括:
外部域名解析单元,用于在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP;
控制服务访问单元,用于通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第二地址映射,访问对应配置控制服务,其中,所述第二地址映射为所述被访问虚拟私有云服务的虚拟私有云IP与所述外网IP之间的映射;
第一接口服务访问单元,用于通过所述配置控制服务,并基于所述虚拟防火墙以及所述第一地址映射,访问所述被访问虚拟私有云服务对应的接口服务。
进一步地,所述接口服务访问模块10具体还包括:
第一服务确认单元,用于获取所述访问对象访问所述被访问虚拟私有云服务的访问链接,通过所述配置控制服务将所述访问链接与预设配置规则进行比对,以确定所述被访问虚拟私有云服务对应的服务。
进一步地,所述接口服务访问模块10具体包括:
第二服务确认单元,用于在所述访问对象与所述被访问虚拟私有云服务属于同一集群且属于同一虚拟私有云时,基于所述被访问虚拟私有云服务对应的服务名,确定所述被访问虚拟私有云服务对应的服务;
发现服务访问单元,用于通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务;
第二接口服务访问单元,用于通过所述服务发现服务访问所述被访问虚拟私有云服务对应的接口服务。
进一步地,所述接口服务访问模块10具体还包括:
被访问服务访问模块,用于在所述访问对象与所述被访问虚拟私有云服务属于同一集群且不属于同一虚拟私有云时,通过所述虚拟防火墙组件以及所述虚拟防火墙组件中的第三地址映射,访问所述被访问虚拟私有云服务对应的服务,其中,所述第三地址映射为所述访问对象所属虚拟私有云的虚拟私有云IP与所述被访问虚拟私有云服务的虚拟私有云IP之间的映射。
进一步地,所述接口服务访问模块10具体还包括:
地址映射配置单元,用于将所述被访问虚拟私有云服务对应的预设外部域名解析策略的标志设置为预设标志,并在所述外部域名解析配置中的外部域名解析服务器中添加访问服务发现服务以及对应地址映射。
进一步地,所述访问请求转发模块20具体还用于:
集群IP确定模块,用于通过所述接口服务获取服务域名记录,并在所述服务域名记录中,根据所述被访问虚拟私有云服务对应的服务,确定所述被访问虚拟私有云服务对应的目标集群IP;
Pod IP转换模块,用于根据预设规则,将所述目标集群IP转换为所述目标服务IP。
其中,上述虚拟私有云服务的访问装置中各个模块与上述虚拟私有云服务的访问方法 实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
此外,本发明实施例还提供一种计算机可读存储介质。所述计算机可读存储介质可以是非易失性,也可以是易失性。
本发明计算机可读存储介质上存储有虚拟私有云服务的访问程序,其中所述虚拟私有云服务的访问程序被处理器执行时,实现如上述的虚拟私有云服务的访问方法的步骤。
其中,虚拟私有云服务的访问程序被执行时所实现的方法可参照本发明虚拟私有云服务的访问方法的各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (20)

  1. 一种虚拟私有云服务的访问方法,其中,所述虚拟私有云服务的访问方法包括以下步骤:
    通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
    通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
  2. 如权利要求1所述的虚拟私有云服务的访问方法,其中,所述通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务的步骤具体包括:
    在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP;
    通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第二地址映射,访问对应配置控制服务,其中,所述第二地址映射为所述被访问虚拟私有云服务的虚拟私有云IP与所述外网IP之间的映射;
    通过所述配置控制服务,并基于所述虚拟防火墙以及所述第一地址映射,访问所述被访问虚拟私有云服务对应的接口服务。
  3. 如权利要求2所述的虚拟私有云服务的访问方法,其中,所述在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP的步骤之前,还包括:
    获取所述访问对象访问所述被访问虚拟私有云服务的访问链接,通过所述配置控制服务将所述访问链接与预设配置规则进行比对,以确定所述被访问虚拟私有云服务对应的服务。
  4. 如权利要求1所述的虚拟私有云服务的访问方法,其中,所述通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务的步骤包括:
    在所述访问对象与所述被访问虚拟私有云服务属于同一集群且属于同一虚拟私有云时,基于所述被访问虚拟私有云服务对应的服务名,确定所述被访问虚拟私有云服务对应的服务;
    通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务;
    通过所述服务发现服务访问所述被访问虚拟私有云服务对应的接口服务。
  5. 如权利要求4所述的虚拟私有云服务的访问方法,其中,所述通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务的步骤之前,还包括:
    在所述访问对象与所述被访问虚拟私有云服务属于同一集群且不属于同一虚拟私有云时,通过所述虚拟防火墙组件以及所述虚拟防火墙组件中的第三地址映射,访问所述被访问虚拟私有云服务对应的服务,其中,所述第三地址映射为所述访问对象所属虚拟私有云的虚拟私有云IP与所述被访问虚拟私有云服务的虚拟私有云IP之间的映射。
  6. 如权利要求4所述的虚拟私有云服务的访问方法,其中,所述通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务的步骤之前,还包括:
    将所述被访问虚拟私有云服务对应的预设外部域名解析策略的标志设置为预设标志,并在所述外部域名解析配置中的外部域名解析服务器中添加访问服务发现服务以及对 应地址映射。
  7. 如权利要求1-6中任一项所述的虚拟私有云服务的访问方法,其中,所述通过所述接口服务确定所述被访问虚拟私有云服务的服务IP具体包括:
    通过所述接口服务获取服务域名记录,并在所述服务域名记录中,根据所述被访问虚拟私有云服务对应的服务,确定所述被访问虚拟私有云服务对应的目标集群IP;
    根据预设规则,将所述目标集群IP转换为所述目标服务IP。
  8. 一种虚拟私有云服务的访问装置,其中,所述虚拟私有云服务的访问装置包括:
    接口服务访问模块,用于通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
    访问请求转发模块,用于通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
  9. 一种虚拟私有云服务的访问设备,其中,所述虚拟私有云服务的访问设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的虚拟私有云服务的访问程序,其中所述虚拟私有云服务的访问程序被所述处理器执行时,实现:
    通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
    通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
  10. 如权利要求9所述的虚拟私有云服务的访问设备,其中,所述通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,包括:
    在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP;
    通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第二地址映射,访问对应配置控制服务,其中,所述第二地址映射为所述被访问虚拟私有云服务的虚拟私有云IP与所述外网IP之间的映射;
    通过所述配置控制服务,并基于所述虚拟防火墙以及所述第一地址映射,访问所述被访问虚拟私有云服务对应的接口服务。
  11. 如权利要求10所述的虚拟私有云服务的访问设备,其中,所述在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP之前,还包括:
    获取所述访问对象访问所述被访问虚拟私有云服务的访问链接,通过所述配置控制服务将所述访问链接与预设配置规则进行比对,以确定所述被访问虚拟私有云服务对应的服务。
  12. 如权利要求9所述的虚拟私有云服务的访问设备,其中,所述通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,包括:
    在所述访问对象与所述被访问虚拟私有云服务属于同一集群且属于同一虚拟私有云时,基于所述被访问虚拟私有云服务对应的服务名,确定所述被访问虚拟私有云服务对应的服务;
    通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务;
    通过所述服务发现服务访问所述被访问虚拟私有云服务对应的接口服务。
  13. 如权利要求12所述的虚拟私有云服务的访问设备,其中,所述通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务之前,还包括:
    在所述访问对象与所述被访问虚拟私有云服务属于同一集群且不属于同一虚拟私有云时,通过所述虚拟防火墙组件以及所述虚拟防火墙组件中的第三地址映射,访问所述被访问虚拟私有云服务对应的服务,其中,所述第三地址映射为所述访问对象所属虚拟私有云的虚拟私有云IP与所述被访问虚拟私有云服务的虚拟私有云IP之间的映射。
  14. 如权利要求12所述的虚拟私有云服务的访问设备,其中,所述通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务之前,还包括:
    将所述被访问虚拟私有云服务对应的预设外部域名解析策略的标志设置为预设标志,并在所述外部域名解析配置中的外部域名解析服务器中添加访问服务发现服务以及对应地址映射。
  15. 如权利要求9-13中任一项所述的虚拟私有云服务的访问设备,其中,所述通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,包括:
    通过所述接口服务获取服务域名记录,并在所述服务域名记录中,根据所述被访问虚拟私有云服务对应的服务,确定所述被访问虚拟私有云服务对应的目标集群IP;
    根据预设规则,将所述目标集群IP转换为所述目标服务IP。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有虚拟私有云服务的访问程序,其中所述虚拟私有云服务的访问程序被处理器执行时,实现:
    通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,其中,所述第一地址映射为被访问虚拟私有云服务的虚拟私有云IP与所述接口服务所属宿主机的IP之间的映射;
    通过所述接口服务确定所述被访问虚拟私有云服务的服务IP,并根据所述服务IP将访问请求转发至所述被访问虚拟私有云服务。
  17. 如权利要求16所述的计算机可读存储介质,其中,所述通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务,包括:
    在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP;
    通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第二地址映射,访问对应配置控制服务,其中,所述第二地址映射为所述被访问虚拟私有云服务的虚拟私有云IP与所述外网IP之间的映射;
    通过所述配置控制服务,并基于所述虚拟防火墙以及所述第一地址映射,访问所述被访问虚拟私有云服务对应的接口服务。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述在访问对象与所述被访问虚拟私有云服务不属于同一集群时,基于外部域名解析服务,对所述访问对象的外部域名进行解析,并确定所述外部域名对应的外网IP之前,还包括:
    获取所述访问对象访问所述被访问虚拟私有云服务的访问链接,通过所述配置控制服务将所述访问链接与预设配置规则进行比对,以确定所述被访问虚拟私有云服务对应的服务。
  19. 如权利要求16所述的计算机可读存储介质,其中,所述通过虚拟防火墙组件以及所述虚拟防火墙组件中的第一地址映射,访问目标服务,并基于所述目标服务访问接口服务包括:
    在所述访问对象与所述被访问虚拟私有云服务属于同一集群且属于同一虚拟私有云 时,基于所述被访问虚拟私有云服务对应的服务名,确定所述被访问虚拟私有云服务对应的服务;
    通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务;
    通过所述服务发现服务访问所述被访问虚拟私有云服务对应的接口服务。
  20. 如权利要求19所述的计算机可读存储介质,其中,所述通过所述被访问虚拟私有云服务对应的服务访问所述虚拟防火墙组件,并通过所述虚拟防火墙组件中的第一地址映射,访问服务发现服务之前,还包括:
    在所述访问对象与所述被访问虚拟私有云服务属于同一集群且不属于同一虚拟私有云时,通过所述虚拟防火墙组件以及所述虚拟防火墙组件中的第三地址映射,访问所述被访问虚拟私有云服务对应的服务,其中,所述第三地址映射为所述访问对象所属虚拟私有云的虚拟私有云IP与所述被访问虚拟私有云服务的虚拟私有云IP之间的映射。
PCT/CN2022/089868 2022-01-14 2022-04-28 虚拟私有云服务的访问方法、装置、设备及存储介质 WO2023134066A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210044198.8A CN114389886B (zh) 2022-01-14 2022-01-14 虚拟私有云服务的访问方法、装置、设备及存储介质
CN202210044198.8 2022-01-14

Publications (1)

Publication Number Publication Date
WO2023134066A1 true WO2023134066A1 (zh) 2023-07-20

Family

ID=81201618

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/089868 WO2023134066A1 (zh) 2022-01-14 2022-04-28 虚拟私有云服务的访问方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN114389886B (zh)
WO (1) WO2023134066A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117082152A (zh) * 2023-09-27 2023-11-17 新华三技术有限公司 服务处理方法、系统及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114389886B (zh) * 2022-01-14 2024-03-08 平安科技(深圳)有限公司 虚拟私有云服务的访问方法、装置、设备及存储介质

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354076A (zh) * 2015-10-23 2016-02-24 深圳前海达闼云端智能科技有限公司 一种应用部署方法及装置
CN109617995A (zh) * 2018-12-29 2019-04-12 北京金山云网络技术有限公司 对租户集群vpc内部容器的管理系统、方法及电子设备
CN110535831A (zh) * 2019-07-30 2019-12-03 平安科技(深圳)有限公司 基于Kubernetes和网络域的集群安全管理方法、装置及存储介质
CN110611697A (zh) * 2019-08-02 2019-12-24 杭州网银互联科技股份有限公司 一种混合云的网络架构及网络部署方法
CN110727499A (zh) * 2019-09-18 2020-01-24 平安科技(深圳)有限公司 资源数据获取的方法、装置、计算机设备和存储介质
CN110737508A (zh) * 2019-10-14 2020-01-31 浪潮云信息技术有限公司 一种基于浪潮云的云容器服务网络系统及实现方法
WO2021042846A1 (zh) * 2019-09-04 2021-03-11 南京中兴软件有限责任公司 网络隔离策略管理方法和网络隔离策略管理系统
CN113452806A (zh) * 2021-06-24 2021-09-28 上海道客网络科技有限公司 基于Kubernetes系统的容器适配SDN网络管理方法和系统
CN114389886A (zh) * 2022-01-14 2022-04-22 平安科技(深圳)有限公司 虚拟私有云服务的访问方法、装置、设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8904511B1 (en) * 2010-08-23 2014-12-02 Amazon Technologies, Inc. Virtual firewalls for multi-tenant distributed services
CN105471907B (zh) * 2015-12-31 2018-09-18 云南大学 一种基于Openflow的虚拟防火墙传输控制方法及系统
CN106713332B (zh) * 2016-12-30 2020-04-21 山石网科通信技术股份有限公司 网络数据的处理方法、装置和系统
CN109451084B (zh) * 2018-09-14 2020-12-22 华为技术有限公司 一种服务访问方法及装置
CN112929322B (zh) * 2019-12-06 2023-04-18 北京百度网讯科技有限公司 云上服务发布访问方法、装置及系统
CN113162835B (zh) * 2021-02-26 2022-08-09 北京百度网讯科技有限公司 访问服务资源的方法、装置、设备以及存储介质

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354076A (zh) * 2015-10-23 2016-02-24 深圳前海达闼云端智能科技有限公司 一种应用部署方法及装置
CN109617995A (zh) * 2018-12-29 2019-04-12 北京金山云网络技术有限公司 对租户集群vpc内部容器的管理系统、方法及电子设备
CN110535831A (zh) * 2019-07-30 2019-12-03 平安科技(深圳)有限公司 基于Kubernetes和网络域的集群安全管理方法、装置及存储介质
CN110611697A (zh) * 2019-08-02 2019-12-24 杭州网银互联科技股份有限公司 一种混合云的网络架构及网络部署方法
WO2021042846A1 (zh) * 2019-09-04 2021-03-11 南京中兴软件有限责任公司 网络隔离策略管理方法和网络隔离策略管理系统
CN110727499A (zh) * 2019-09-18 2020-01-24 平安科技(深圳)有限公司 资源数据获取的方法、装置、计算机设备和存储介质
CN110737508A (zh) * 2019-10-14 2020-01-31 浪潮云信息技术有限公司 一种基于浪潮云的云容器服务网络系统及实现方法
CN113452806A (zh) * 2021-06-24 2021-09-28 上海道客网络科技有限公司 基于Kubernetes系统的容器适配SDN网络管理方法和系统
CN114389886A (zh) * 2022-01-14 2022-04-22 平安科技(深圳)有限公司 虚拟私有云服务的访问方法、装置、设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117082152A (zh) * 2023-09-27 2023-11-17 新华三技术有限公司 服务处理方法、系统及装置
CN117082152B (zh) * 2023-09-27 2024-01-12 新华三技术有限公司 服务处理方法、系统及装置

Also Published As

Publication number Publication date
CN114389886A (zh) 2022-04-22
CN114389886B (zh) 2024-03-08

Similar Documents

Publication Publication Date Title
US10567413B2 (en) Rule-based network-threat detection
US11336696B2 (en) Control access to domains, servers, and content
WO2023134066A1 (zh) 虚拟私有云服务的访问方法、装置、设备及存储介质
US9571523B2 (en) Security actuator for a dynamically programmable computer network
US11240152B2 (en) Exposing a subset of hosts on an overlay network to components external to the overlay network without exposing another subset of hosts on the overlay network
US8583801B2 (en) DNS outage avoidance method for recursive DNS servers
WO2021057889A1 (zh) 一种数据处理方法、装置、电子设备及存储介质
CN110311929B (zh) 一种访问控制方法、装置及电子设备和存储介质
US10911406B2 (en) Accessing cloud resources using private network addresses
WO2015117337A1 (zh) 网络规则条目的设置方法及装置
US20160036848A1 (en) Intercloud security as a service
US10469499B2 (en) Website filtering using bifurcated domain name system
US20120173727A1 (en) Internet Access Control Apparatus, Method and Gateway Thereof
US10178068B2 (en) Translating network attributes of packets in a multi-tenant environment
US20140282818A1 (en) Access control in a secured cloud environment
CN112104640A (zh) 网关的数据处理方法、装置、设备及可读存储介质
WO2022165061A1 (en) Unified policy enforcement management in the cloud
US11245717B1 (en) Automated detection, alarming, and removal of subdomain takeovers
US11711342B2 (en) Endpoint-assisted access control for network security devices
WO2015152869A1 (en) Redirecting connection requests in a network
US10958580B2 (en) System and method of performing load balancing over an overlay network
US20150295886A1 (en) System for identifying current internet protocol address for a remote computing device
CN111787028A (zh) 一种网络访问控制方法、设备及存储介质
CN112787947A (zh) 网络业务的处理方法、系统和网关设备
US9519501B1 (en) Hardware assisted flow acceleration and L2 SMAC management in a heterogeneous distributed multi-tenant virtualized clustered system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22919707

Country of ref document: EP

Kind code of ref document: A1