pointing my ingress domain something.com to kubernetes ingress domain web.example.com using cname is not working - kubernetes-ingress

I have a domain name web.example.com in kubernetes ingress . When I point another domain something.com to web.example.com the ingress is not allowing this domain . The page is not opening . I need several domains to kubernetes ingress domain . These domains belongs to different customers . So what ever domain point to my domain web.example.com it should work . The other domains are pointed to ingress domain using the cname of the customer domain .Please help
I tried to point my domain something.com to my kubernetes ingress domain using cname .but it is not working .

Related

How can i connect my domain (godaddy) to my EKS ALB

I have successfully installed and ingress into my EKS cluster and all its dependancies such as the AWS Load Balancer Ingress Controller, ServiceAccounts and the rest of them.
I have also applied the manifest below which has created an application load balancer i can see in my console with the right target. It points to the right service. Now my issue is i bought my domain on Godaddy, and previously i'd create a classic Loadbalancer and attach an Elastic IP to that load balancer then add that EIP address to my Godaddy DNS record and that would work and that would route my domain name to the classic elb.
Now i am trying to route through an alb.
Ingress Manifest
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ing0-test
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: instance
spec:
rules:
- host: example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ui0-service
port:
number: 80
The image below shows the ALB in the console.
I can also see the target has been picked up properly.
however when i copy the DNS name of that ALB into the browser, i do not get anything returned. I am expecting to see a site which one of my network load balancer is pointing to through a pod deployment. I am able to paste the network load balancer DNS name to the browser and see a site. I expect that since the ingress is deployed correctly, it should route to that same network load balance through one of the ingress paths.
so for instance let's say this is the ingress dns name k8s-ingXXXXXXX.eu-west-1.elb.amazonaws.com ... i expect that this should route me to example.com... Also how do i map my Godaddy domain name to this ingress.
You can only add alias(A) record for top level domain. There are two possible ways to solve your issue.
Use nginx ingress controller instead of AWS load balancer controller. Nginx ingress controller can create NLB for your service. Which will have a static ip. (https://kubernetes.github.io/ingress-nginx/deploy/)
Use Route53 hosted zone as DNS server for your domain. Basically you need to replace GoDaddy nameservers with AWS Route53's name server. Then you can use Alias record.(https://aws.amazon.com/premiumsupport/knowledge-center/route-53-create-alias-records/)

k8s nginx Ingress take my node IP as Address

I have 3 node k8s Cluster on my virtual env which is VMware Fusion.
When try to create basic Ingress it takes my one node_ip which is nginx_controller running.
But 80 port is not open on all nodes. I mean it is not working
curl: (7) Failed to connect to 172.16.242.133 port 80: Connection refused
What I missing ?
I installed Nginx Ingress Controller
I installed MetalLB and configured it. It is working if I create service with type: LoadBalancer. It takes ExernalIp Ip and I can access it.
I deploy basic app for test.
I create a service for app. I can access on NodePort or CulesterIP. Both I tried.
I create basic Ingress for manage hosts and routing staff. But this step I stuck.
My Questions ;
1-) Normaly what should Ingress take Ip as Address ? One of my node or External DHCP IP.
2-) When I create service with type: LoadBalancer it takes externalIP. I can record DNS to this IP and clients can access it. What is wrong with that ?
Ingress supports two types of service type: NodePort and LoadBalancer.
While using NodePort service type you should use nodeport number instead of default port 80. Explanation to this behavior is available in nginx ingress documentation:
However, due to the container namespace isolation, a client located
outside the cluster network (e.g. on the public internet) is not able
to access Ingress hosts directly on ports 80 and 443. Instead, the
external client must append the NodePort allocated to the
ingress-nginx Service to HTTP requests.
So your curl should look like this:
curl 172.16.242.133:<node_port_number>
When you use MetalLB with LoadBalancer service type, it takes externalIPs from it's configuration that you specified when installing metallb in cluster.
More information about nginx ingress controller cooperation with metallb is available in nginx documentation.
MetalLB requires a pool of IP addresses in order to be able to take
ownership of the ingress-nginx Service. This pool can be defined in a
ConfigMap named config located in the same namespace as the MetalLB
controller. This pool of IPs must be dedicated to MetalLB's use, you
can't reuse the Kubernetes node IPs or IPs handed out by a DHCP
server.
My Problem was,
I thought Ingress takes the IP and we record DNS to this IP. But It is not. Why Ingress object has Address and Port field I do not know. Just for information I guess but It is confusing for newbies.
Clients access the Ingress Controller not Ingress.
Actually Ingress Controller Service manages the externalIP or NodePort. So we have to configure this.
In my case nginx
kubectl edit service/ingress-nginx-controller -n ingress-nginx
You can change type to LoadBalancer and you will get externalIP after configured the MetalLB. And define your Ingress objects, record DNS Records then you are ready.

Google Cloud VPS Compute Engine without a Domain

I have a VPS with Google Cloud Compute Engine which I can reach through an external IP. Next to my external IP I can reach my VPS through: 122.xx.xx.34.bc.googleusercontent.com
Is Google also offering an option to reach your website through NAME.bc.googleusercontent.com or something different than an IP.
I don't want use cheap domain name or free domain name as .tk
You can use any domain name to reach your VM instance that you run on Google Compute Engine. To do it follow steps below:
register domain name at any domain name registrar
set up DNS servers for your domain name (usually DNS hosting service provided by domain name registrar)
reserve external static IP for your VM (optional, but could be helpful)
create A record that point to external IP of your VM
wait 24-72 hours for propagating domain names
reach you service via domain name like https://domain.name
In addition, you can register your domain name at Google Domains and use Google Cloud DNS as DNS service for your domain.
You're not able to use NAME.bc.googleusercontent.com because 122.xx.xx.34.bc.googleusercontent.com is a PTR record.

Any documentation on how to configure multiple/2 domain for one amazon lightsail instance

I need to set up two domain from godaddy to one instance of lightsail.
I already configure two hotzones, one for the example.com domain and the other for the example2.com domain.
The example.com is loading well, but I get the DNS_PROBE_FINISHED_NXDOMAIN on the second one.
I already updated the DNS on godaddy.
I modify the vhost with the two domains.
I have try to have one hotzone and a domain and subdomain and I havent been able to load the example2.com domain.
Move your DNS Management to Lightsail DNS Zone
Create static IP for your instance
Update your A Record pointing to your static IP
Follow this for all two Domains
Now your two domains point same Static IP which has a one instance

External IP address appears instead of Domain Name

I am running a website in Google Compute Engine and configured a DNS zone and an A record to point to the IP address where my web-server runs. In my domain registrar (GoDaddy), I changed name-servers to point to Google name servers.
I can browse to the website without issues, but it show the IP address of the server instead of domain name. How can I change that to show domain name such as www.example.com instead?
I have a website hosted in GCE running under a Linux machine Apache Server. I created an A record in my DNS pointing to the external IP address of the server. When I access the link the subdomain name is not replaced by the IP. I do not believe your issue is particularly related to Compute Engine.
Particularly if you are using WordPress you will need to change some configuration files as stated in
http://codex.wordpress.org/Changing_The_Site_URL
https://wordpress.org/support/topic/browser-displaying-ip-instead-of-domain-name
The below solution worked for me,
GCP set IP Address as site URL when you deploy WordPress on google cloud.
Please change it to your domain name,
WordPress Admin Panel >> Settings >> Site URL (& WordPress URL as
well) >> add your domain name into textbox
Attached is the image for your reference.