def k8s_ports_to_metadata_ports(k8s_ports):
ports = []<EOL>for k8s_port in k8s_ports:<EOL><INDENT>if k8s_port.protocol is not None:<EOL><INDENT>ports.append("<STR_LIT>" % (k8s_port.port, k8s_port.protocol.lower()))<EOL><DEDENT>else:<EOL><INDENT>ports.append(str(k8s_port.port))<EOL><DEDENT><DEDENT>return ports<EOL>
:param k8s_ports: list of V1ServicePort
:return: list of str, list of exposed ports, example:
        - ['1234/tcp', '8080/udp']