#!/bin/bash
input="/tmp/servicios"
rm $input-limpio
kubectl get svc -A |grep Node > $input
while IFS= read -r line
do
  #echo "$line"
  aplicacion=`echo "$line"| cut -c20-55`
  puerto=`echo "$line"| cut -f2 -d':'|cut -c1-5`
  echo "$aplicacion - $puerto" >> "$input-limpio"

done < "$input"


cat $input-limpio | sort -k 3
