I need the hostname of the service lensespostgres-postgresql, but I get an error:

$ kubectl get services -n default                                                                                              
NAME                                 TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)    AGE
kubernetes                           ClusterIP   ........     <none>        443/TCP    20m
lensespostgres-postgresql            ClusterIP   ........     <none>        5432/TCP   14m
lensespostgres-postgresql-headless   ClusterIP   None         <none>        5432/TCP   14m
$ ping lensespostgres-postgresql.default.svc.cluster.local
ping: lensespostgres-postgresql.default.svc.cluster.local: Name or service not known


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.