k8s (k3s): expose a service automatically - kubernetes

Is there a way to kubernetes creates an ingress according to a just deployed service?
I've just created a k3d cluster and I''ve deployed my springboot service.
I've deployed a manifest with a DeploymentConfig and a Service.
I'd like this just created service is available out of kubernetes...
Any ideas?

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 integrate AWS api gateway with EKS cluster to access the microservices deployed on cluster IP using ELB

I have created EKS cluster in that cluster created 2 nodes & deployed few microservices on cluster IP.
As cluster IP is only internally accessible so wanted to configure it with AWS API gateway using ELB.
When you create an ingress in kubernetes, it automatically creates a load balancer for the ingress.
If you are using route 53 as your dns manager then after you have created an ingress you can add an A record to point to the newly created Application Load Balancer.
Please refer to the AWS document here to create ingress controllers:
https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
One solution to the problem is to change the service to a Private NLB using the load balancer controller and then link this nlb to api gateway via VPC link
Further process and documentation for the process can be found here

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.

Does kubernetes Deployment automatically create the service like openshift DeploymentConfig does?

I created a deployment using kubernetes Deployment in openshift cluster. i expected it to create the service for all the container ports like openshift DeploymentConfig does.
but i did not find any service created by the kubernetes Deployment.
does kubernetes Deployment not create the service automatically like openshift DeploymentConfig does ?
My openshift version is 3.11
Both Deployment and DeploymentConfig does not create the Service component in OpenShift. These component are used for creation of Replication Control of the Pod.
Service has to be configured separately with the selector parameter to point to the specific Pods.
selector:
name: as in the deployment or in deploymentConfig.
This link would help you on the same.
https://docs.openshift.com/container-platform/3.3/dev_guide/deployments/how_deployments_work.html#creating-a-deployment-configuration
Deployment and service are different kubernetes objects. Deployment doesnt automatically create service object. you need to define service definition in a YAML targeting the ports from the pod definition inside deployment manifests. You need to deploy both deployment and service objects. you can deploy then separately or bundle them together in a single YAML and deploy.
Further details follow the link --> https://kubernetes.io/docs/concepts/services-networking/service/

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

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