The invention provides a method for achieving Kubernetes cluster service
public network access through a P2P network and a gateway. The method is characterized in that the method is based on a Service Controller
assembly, a
gateway system, a P2P
virtual network and a DNS
system; comprising the following steps: S1, deploying a
gateway system, and configuring domain names and extensive
domain name certificates; s2, deploying a P2P
system; s3, configuring a routing forwarding rule for the P2P node of the K8S cluster through the P2P
server; s4, the resource change in the Kubernetes cluster is monitored in real time; s5, performing gateway configuration; according to the invention, through the P2P
virtual network and the point-to-point distributed architecture, the risk of
single point failure is eliminated, through end-to-end
encryption and dynamic key negotiation, the risk of
certificate leakage is prevented, and through a multi-level security mechanism, the overall security of the
system is enhanced, the network forwarding level is reduced, and the service access
delay is reduced.