chilly-telephone-51989
08/20/2022, 8:22 PMapiVersion: v1
kind: Service
metadata:
name: postgres
namespace: xp
labels:
service: postgres
type: database
spec:
type: ClusterIP
selector:
service: postgres
type: database
ports:
- name: client
protocol: TCP
port: 5432
targetPort: 5432
---
apiVersion: v1
kind: Endpoints
metadata:
name: postgres
namespace: xp
labels:
service: postgres
type: database
subsets:
- addresses:
- ip: 172.19.0.2
ports:
- name: client
port: 5432
protocol: TCP
I tried verifying the service using busybox but
nslookup and ping both fail for postgres.xp
however pinging the IP 172.19.0.2 runs just fine.
how do I expose the IP of an external service inside?sticky-summer-13450
08/23/2022, 2:18 PMExternalName
.
apiVersion: v1
kind: Service
metadata:
name: mysql
spec:
type: ExternalName
externalName: mysql001.lan
chilly-telephone-51989
08/23/2022, 2:42 PMsticky-summer-13450
08/26/2022, 1:39 PMWhen the pod access db, it does it at a slow pace.That is interesting. I had recently added an
Ingress
, using Traefik in my K3s (v1.23.8+k3s1) cluster, which was to a Service
that was just an ExternalName
to a web server I have elsewhere in a private subnet - this was just to add TLS security to this web service and publicly expose it. The public end runs terribly slowly, often with 10 second pauses between HTTPS calls.
I haven't had time to investigate further, but it is an interesting coincidence that you are experiencing slow access to external systems using an ExternalName
type of Service
.chilly-telephone-51989
08/26/2022, 3:44 PM