title: The order of endpoints ports are inconsistent with configeration
body: <p>I have created a service, the spec of the service just like this:</p>
  <pre class="lang-yaml prettyprint-override"><code>spec:
    clusterIP: None
    clusterIPs:
    - None
    ports:
    - name: rpc
      port: 8080
      protocol: TCP
      targetPort: 8080
    - name: metric
      port: 9090
      protocol: TCP
      targetPort: 9090
    selector:
      role: mmq
    sessionAffinity: None
    type: ClusterIP
  </code></pre>
  <p>I will get the first item of ports slice in my code, then I can send requests to the <em>rpc</em> port. But when I try to use <strong>Endpoints</strong> to get the ports, the order of ports show as this:</p>
  <pre class="lang-yaml prettyprint-override"><code>  ports:
    - name: metric
      port: 9090
      protocol: TCP
    - name: rpc
      port: 8080
      protocol: TCP
  </code></pre>
  <p>Could anyone told me why <strong>Endpoints</strong> show different order with my service configeration?</p>
  <p>My service used to deploy on k8s v1.16, this problem did not occur before, is there anything new since v1.16?</p>
  <p>current kubernetes version: v1.20.11</p>