Created
December 3, 2022 21:44
-
-
Save erangaeb/d041f3b23435d3c373a55c588361c2da to your computer and use it in GitHub Desktop.
k8s endpoints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create endpoints | |
kubectl apply -f endpoint1.yaml | |
kubectl apply -f endpoint2.yaml | |
# create two services | |
❯❯ kubectl get svc | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
bassa ClusterIP None <none> 5432/TCP 10m | |
rahasak ClusterIP None <none> 5432/TCP 12m | |
# create two endpoints | |
❯❯ kubectl get endpoints | |
NAME ENDPOINTS AGE | |
bassa 10.1.212.16:25432 11m | |
rahasak 10.1.212.15:15432 12m | |
❯❯ kubectl describe endpoints rahasak | |
Name: rahasak | |
Namespace: default | |
Labels: app.kubernetes.io/component=blackbox | |
app.kubernetes.io/name=rahasak | |
Annotations: <none> | |
Subsets: | |
Addresses: 10.1.212.15 | |
NotReadyAddresses: <none> | |
Ports: | |
Name Port Protocol | |
---- ---- -------- | |
db 15432 TCP | |
Events: <none> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment