a typical Nginx service file and a Nginx route yaml for Use in Open SHift - unix1998/technical_notes GitHub Wiki

            1. service YAML ###################
apiVersion: v1 kind: Service metadata:
  name: nginx-service

spec:

  selector:
    app: nginx  # Matches pods with label "app: nginx"
  ports:
  - protocol: TCP
    port: 80  # Service listens on port 80
    targetPort: 80  # Forwards traffic to pods' port 80 (default for Nginx)
  type: ClusterIP  # Internal cluster access by default
                    1. end of Service Yaml ##############
                    2. route YAML file##############################
apiVersion: route.openshift.io/v1 kind: Route metadata:
  name: nginx-route

spec:

  wildcardPolicy: None  # No subdomain support
  host: my-nginx-app.example.com  # External hostname
  port: 80  # Route listens on port 80 (optional)
  to:
    kind: Service
    name: nginx-service  # Points to your internal service
                    1. end of Route yaml####
⚠️ **GitHub.com Fallback** ⚠️