Accessing services without pod (without istio envoy) from outside cluster through istio ingress rules in K8s - kubernetes

Steps:
1. I have created 2 namespaces (ns1 and ns2).
2. in ns1, i have deployed service where envoy proxy is enabled (istioctl kube-inject service.yaml)
2. in ns1, i have created istio ingress rules pointing to the service and i am able access it from outside the cluster.
3. in ns2, i havnt deploy any service because it is my shared namespace hence i have created headless service (External Name) which is pointing to the service deployed in ns1 namespace.
The problem is; i am not able to access service which is deployed in ns2 from outside the cluster. it is throwing 404 service not found.
did i miss anything here... do we have any other solution to address this?
Thanks,
Nikhil

Related

bitnami/external-dns with Kubernetes on Docker Desktop does not work

What I'm trying to do
I have deployed an aps.net core gRpc service on Docker for Desktop (Kubernetes enabled). To do client-side load balancing, I want to expose the same via a headless service. The deployment and service definition YAML files are as provided by the link viz. Deployment.yaml , service.yaml, and PV and PVC .yaml. When the deployment is run two replicas will be created. Now I want to expose them via a headless service and do a DNS lookup of the pods' IP addresses and do a client-side load balancing. For this, I installed the bitnami external-dns using the HELM charts. I did not make any modifications to the default chart values. Now when I try to do a nslookup of my service this is not working.
My expectation
Deploy the bitnami external-dns on Docker for Desktop with Kubernetes enabled and configured service to expose as DNS on the load balancer. I was expecting the nslookup to succeed in getting the pod IPs as a result
Can someone help me to get the same working?

How to configure Ingress Controller on Kubernetes Cluster installed with kubeadm

I installed a Kubernetes cluster with "kubeadm" on Hetzner Cloud.
After successful installation, I installed the Ingress Controller with Helm.
The EXTERNAL-IP of the ingress controller service is in the pending state.
The default type is LoadBalancer and as I know this type is only supported by cloud providers like AWS, Google...
So I changed the service type to NodePort.
How should I configure the external DNS to my services?
I don't want to append the 3.... ports but let the Ingress controller manage that for me.
Setting up ExternalDNS for Services on Hetzner DNS article provides efficient and work method to manage external DNS.
Main steps
1. Creating a Hetzner DNS zone
2. Creating Hetzner Credentials
3. Deploy ExternalDNS
4. Deploying an Nginx Service
5. Verifying Hetzner DNS records

Could service port be the same in Kubernetes

In kubernetes, I have an application pod (A-pod), then I create a service (A-service) for this pod and expose service's port as 5678.
Now in a cluster, I have 5 namespaces, each namespace will running a service (A-service) and a pod (A-pod), so in total there are 5 A-services that are running.
My question is, because 5 A-services is using the same port (5678), does it cause conflict? How to access the different services in different namespace with service name?
Yes, it assigns each different Service name in each namespace. If you have a Service called A-service in a Kubernetes namespace your-ns, the control plane and the DNS Service acting together create a DNS record for A-service.your-ns appropriately. Refer here for more details.

Is it possible or right to configure Nginx Ingress Controller on Openshift cluster?

I have Kubernetes cluster setup available on my system. I have verified that my definitions for Ingress controller and Ingress resources working over it as I am able to invoke services inside my K8 cluster from outside the cluster.
Now, I have to move all my resources to Openshift cluster. I just deployed my definitions of Ingress resources from K8 to Openshift but those are not working, as I am not able to access services from outside the cluster. Note that I didn't deploy Ingress controller on Openshift which I did on K8.
The problem is, I don't want to use Openshift Route as an Ingress alternate. So, in order to get my Ingress resource working on OpenShift(OC) cluster what am I supposed to do? Shall I install Ingress controller on Openshift like I did on K8 cluster?
I don't want to use any Openshift specific resource on Openshift cluster, just wanted to utilize embedded Kubernetes of it.
Kindly suggest.

Exposing a service in Kubernetes using nginx reverse proxy

I am new to Kubernetes and wanted to understand how I can expose a service running in Kubernetes to the outside world. I have exposed it using a NodePort on the cluster.
So, for example: A service exposes port 31234 on the host and I can get to the service from another server through https://kubeserverIP:31234.
What I want to achieve is serve this service through nginx (on a different server, out of Kube control) via a url,say, http://service.example.com. I have tried deploying nginx with an upstream pointing to the service but that is not working and get a bad gateway error.
Is there something which I am missing here? Or is there a neater way of achieving this.
I have a baremetal installation of Kubernetes cluster and have no access to gce load balancer or other vendor LBs.
Thanks
Thanks for pointing in the right direction.
Essential steps broadly were:
Create an app and its service definition.
Create a namespace for ingress.
Create a default backend deployment and service for redirecting all requests not defined in Ingress rules. Create these in the ingress space
Create the nginx ingress controller deployment.
Create RBAC rules.
Finally create the ingress rule for the applications with the paths and the ports.
Found a very useful guide which explained things in details:
https://akomljen.com/kubernetes-nginx-ingress-controller/
You're almost there! Your next step will be to setup a ingress controller. There is an NGINX Ingress controller plugin that you can checkout here.
Edit: Here's an example configuration: https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example