Home > Back-end >  How I can get the URL Kubernetes Application
How I can get the URL Kubernetes Application

Time:06-08

I would like to know the URL from Kubernetes application, I have a kubernetes service running but nothing I am not able to access the URL link.

CodePudding user response:

Access the application using service ClusterIP and service port from the cluster members. if you define the service type as NodePort then you can access the application on any of the cluster host name and NodePort. Assuming that the application pods are bound to the service using appropriate pod selector.

CodePudding user response:

You can use ClusterIP service type by specifying the external IP as the IP of the machine and the port which you want to use. [don't forget to specify the right selector to your workload]

apiVersion: v1
kind: Service
metadata:
  name: service-name
spec:
  ports:
  - protocol: TCP
    port: 5000      
    targetPort: 5000
  selector:
    app: workload-selector
  externalIPs: 
     - 192.168.1.12
  • Related