The invention discloses a network endpoint slicing method based on a Kubernetes container, which belongs to the operation control technology of software application, and comprises the following steps:configuring an EndpointSlice Controller in a controller manger component in a Kubernetes cluster, and monitoring Service and Pod resources through an API Server when the EndpointSlice Controller is started; when the EndpointSlice Controller monitors that the Service or the Pod is subjected to the event of adding, modifying or deleting, the EndpointSlice Resource is subjected to the correspondingoperation of adding, modifying or deleting; and when the Kube-Proxy component monitors that the EndpointSlices are newly added, modified or deleted, the KubeProxy component synchronously and correspondingly updates the rule of the Service function, so that the Service function is realized or prohibited. According to the method, the network endpoint resource EndpointSlice is newly added, when it ismonitored that EndpointSlices are changed, iptables or IPVS rules can be synchronously updated, the actual function of Service is achieved or forbidden, the flow load condition of a large cluster canbe greatly reduced, and the performance of the cluster is improved.