jclouds and rackspace clouddb private ip address to create loadbalancer - rackspace-cloud

I was able to create a mysql instance and got the host name . Now trying to create a loadbalancer using the jclouds rackspace api but fails on validation with hostname in builder. I am passing in the hostname in the place of ip address.
How do I get private ip address of the clouddb instance i created on rackspace using jclouds ?
How do I create a Load Balancer using jclouds using clouddb host name ?
Here is my code that fails :
org.jclouds.rackspace.cloudloadbalancers.v1.domain.AddNode;
AddNode addNode = AddNode.builder()
.address(hostName)
.condition(ENABLED)
.port(3306)
.weight(20)
.build();
Any help would be appreciated.

This example should demonstrate how to use clouddb with loadbalancers:
https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/clouddatabases/TestDatabase.java
The part you might be interested in is
AddNode addNode01 = AddNode.builder()
.address(getInstance().getHostname())
.condition(Node.Condition.ENABLED)
.port(3306)
.build();

Related

configure static/public ip for azure mysql

Azure has provided the access to the mysql instance as the domain name as
X.mysql.database.azure.com
I am able to connect it properly. But I need to get the public/static ip address which we can use to access this instance.
Thank you.
No. You cannot make a static IP address assignment for your Azure SQL Server or Azure Sql Database.
You have to workaround your requirement for static IP address assignment to work with the DNS Name (x.database.windows.net).

how to set dns to azure aks?

I am currently using Azure AKS.
I have a frontend application which is using LoadBalancer to have a public IP to access the service.
Should I just direct my domain name to the public IP address?
Because the IP is dynamic, if the port is destroy and recreate again, a new IP is generated.
Should I use Ingress/Nginx controller to manage the IP?
You can use A record points to the external IP address.
You can change the public IP address to static via Azure portal, in this way, restart the service will not change the IP.
But in Azure, if we delete the Azure AKS, the Public IP address will collected by Azure platform, and we will lose this IP address.
You can use kubernetes-incubator/external-dns to automatically update the A record in your Azure DNS zone with the (dynamic) IP of the Azure Loadbalancer or Ingress controller. Read here how to set up.
You're not limited to use Azure DNS, you could use other providers to, in v0.4: Google CloudDNS, AWS Route 53, AzureDNS, CloudFlare, DigitalOcean,
DNSimple, Infoblox
Should I just direct my domain name to the public IP address?
As Mohit said, we can set static public IP via Azure portal, and map your domian name to that Public IP address.
Because the IP is dynamic, if the port is destroy and recreate again,
a new IP is generated.
By default, AKS expose pods to internet will create a Kubernetes service, the Public IP address work for that service.
If one pod was not work(multiple pods), AKS will create another pod in your service and that will not get a new public IP. But if you only have one pod in that service and re-create that pod, we will get a new Public IP address.
For now, Azure does not support to keep the public IP address for AKS service.
Hope this helps.

Limit access to public ip (whitelist)

I want to set up a kubernetes cluster with a loadbalancer. Kubernetes will create a load balancer in azure and connect a public ip address with it.
But I don't want to make the api public, it should be exclusive for my api management service.
I tried to direct the load balancer into a vnet with the api service but I found nothing.
So I thought I could just limit the access to the public ip (a whitelist with only the incluced ip of my service) but I found nothing on the internet.
Is it possible to set such rule on a public ip or do I need some extra service for this problem?
With Kubernetes, assuming you have a service defined
Use the following commands:
kubectl get service
kubectl edit svc/<YOUR SERVICE>
change the type from LoadBalancer to ClusterIP
Now you can consume internally the service.

How do I expose Kubernetes service to the internet?

I am running a kubernetes cluster with 1 master (also a node) and 2 nodes on Azure. I am using Ubuntu with Flannel overlay network. So far everything is working well. The only problem I have is exposing the service to the internet.
I am running the cluster on an azure subnet. The master has a NIC attached to it that has a public IP. This means if I run a simple server that listens on port 80, I can reach my server using a domain name (Azure gives an option to have a domain name for a public IP).
I am also able to reach the kubernetes guest book frontend service with some hack. What I did was check all the listening ports on the master and try each port with the public IP. I was able to hit the kubernetes service and get response. Based on my understanding this is directly going to the pod that is running on the master (which is also a node) rather than going through the service IP (which would have load balanced across any of the pods).
My question is how do I map the external IP to the service IP? I know kubernetes has a setting that works only on GCE (which I can't use right now). But is there some neat way of telling etcd/flannel to do this?
If you use the kubectl expose command:
--external-ip="": External IP address to set for the service. The service can be accessed by this IP in addition to its generated service IP.
Or if you create from a json or yaml file, use the spec/externalIPs array.

Cloud Foundry On Azure VM

I've successfully installed VCAP on my ubuntu 12.04 on azure . Now I plan to access it on public .
Information about it is :
DNS :
meruvian354.cloudapp.net
HOST NAME :
meruvian354
PUBLIC VIRTUAL IP ADDRESS (VIP) : 168.62.193.163
INTERNAL IP ADDRESS : 10.76.198.28
My target is generate automaticaly domain "myapp".meruvian354.cloudapp.net and vcap on make it online.
How do I have to set it on cloud_controller.yml ?
and Do I have to set configuration on
You need a wildcard domain pointing at the public IP address, I can see you have meruvian354.cloudapp.net registered as the api url for the cloud controller as I was able to register an account!
If you registered mydomain.com you would have to create a wildcarded "A" domain record for that domain and point it to the public IP address. You would then need to either create a new deployment using the -D option to specify the new domain or adjust the configuration of the current deployment using a tool like sed, see this question for another example;
cloudfoundry - vmc register error with external uri

Resources