Is there a way to scale/list node pools for a specific project ID using kubernetes-client java or kubernetes-client-extended libraries.?
I tried searching for APIs present inside kubernetes-client java library but didn't got any.
Link : https://github.com/kubernetes-client/java
If you are using GKE then refer to this doc to add or manage the node pools or verify this instance's methods of creating a node pool, auto scaling the node pools.
You can also find more client libraries of kubernetes here.
Edit1 :
seems to be there is no direct or generic liberary to list/scale node pools but in GKE we are having an option called resize Google Kubernetes Engine (GKE) Standard clusters. You can resize a cluster to increase or decrease the number of nodes in that cluster.
You can also use GKE's cluster autoscaler feature that automatically resizes your node pools in response to changing conditions, such as changes in your workloads and resource usage.
Edit2 :
There is no native k8s library available to list or scale node pools.
You can raise your issue here
These are the officially available kubernetes client libraries and link for java client Library
Related
I have to create and configure a two node WSO2 EI cluster. In particular I have to cluster an ESB profile and MB profile.
I have some architectural doubts about this:
CLUSTERING ESB PROFILE DOUBTS:
I based my assumptions on this documentation: https://docs.wso2.com/display/EI640/Clustering+the+ESB+Profile
I found this section:
Note that some production environments do not support multicast.
However, if your environment supports multicast, there are no issues
in using this as your membership scheme
What could be the reason for not supporting multicast? (so I can inform about possible issues with it). Looking into the table (inside the previous link) it seems to me that possible problem could be related to the following points:
All nodes should be in the same subnet
All nodes should be in the same multicast domain
Multicasting should not be blocked
Is obtaining this information from system\network engineers enough to decide whether to proceed with the multicast option?
Using multicast instead of WKA, would I need to do the same configuration steps listed in the first deployment scenario (the WKA based one) related to the "mounting registry" and "creating\connecting to databases" (as shown in the first documentation link)?
Does using Multicast instead of WKA allow me to not stop the service when I add a new node to the cluster?
CLUSTERING MB PROFILE:
From what I understand, MB profile cluster can use only WKA as membership scheme.
Does using WKA mean that I have to stop the service when I add a new node to the cluster?
So at the end can we consider the ESB cluster and the MB cluster two different clusters? Does the ESB cluster (if it is configured using multicast) need the service to be stopped when a new node is added while the MB cluster is stopped to add a new one?
Many virtual private cloud networks, including Google Cloud Platform,
Microsoft Azure, Amazon Web Services, and the public Internet do not
support multicast. Because such a platform does not support multicast.
If you configure wso2 products with multicast as the membership shceam it will not work as expected. That is the main reason for the warning in the official documentation.
You can consider the platform capability and chose any of the following membership schemes when configuring Hazalcast clustering in WSO2 Products.
WKA
Multicast
AWS
Kubernetes
Other than WKA the rest of the options for membership schema does not require you to include all the IPs of the member's in the configuration. So newly introduced nodes can join the cluster with ease.
Even in the WKA membership scheme if you have at least one known member active you can join a new member to the cluster then follow the configuration change and restart the other services without any service interruption.
Please note with all the above membership scheme usages the rest of
the configurations related to each product are needed to successfully
complete the cluster.
Regarding your concern about Clustering the MB Profile,
You can use any of the above-mentioned membership schemas which matches your deployment environment.
Regarding the adding new members to WKA, You can maintain service availability and apply the changes to servers one by one. You only need at least one WKA member running to introduce a new member to the cluster.
WSO2 MB Profile introduces cluster coordination through an RDBMS. With this new feature by default, cluster coordination is not handled by hazelcast engine. When the cluster coordination through an RDBMS is dissabled is allow the hazelcast engine to manage cluster coordination
Please note when the RDMS coordination is used there are no server restarts required.
I hope this was helpfull.
I have 2 nodes of WSO2 in cluster. Log says that both nodes connected to cluster. But each node has its own service list. The thing I want is when i configure service in one node, it must be synchonized to another one.
All things configured as in this tutorial
https://docs.wso2.com/display/CLUSTER44x/Setting+up+a+Cluster#SettingupaCluster-Configuringtheloadbalancer
I suppose you have used SVN based deployment synchronization. Could please try rsync as mentioned in [1]. This is the more recommended synchronization mechanism.
I have gone through the cloudbreak documentation and I am still not sure what is the exact purpose of this component.
Is it actually useful only for deploying the cluster in any cloud services and if so can we customise the components that needs to be installed in the cluster.
If it is only for maintaining the deployment of a cluster then is there any cost involved in using cloudbreak?
Cloudbreak main purpose is Hdp or Hdf cluster management. It provides an UI and api to access, create and edit the cluster. It also provides access control management for the clusters. Yes you can customize the components installation via ambari blueprint.
One additional benefit was from its component periscope, which provides autoscaling based on ambari alerts.
I wanted to get List of containers and their details running on GCP Kubernets,
From API page https://developers.google.com/apis-explorer/#p/container/v1/
We could get Cluster and Node details, but I'm looking for more granular levels like Pods and Container.
Is there any way to get those.
Pod and container details are accessible through the kubernetes API, not using the Google Cloud SDK.
Unfortunately, this means getting that information on a per cluster basis.
Alternatively, the Cloud Console can be used by going to Kubernetes Engine > Workloads which will list all replica sets and individual pods (if not controlled by a replicaset).
You might be able to configure Stackdriver Monitoring to create a group consisting of all the pod and container resources in use in the project and then use the Monitoring API to call on that group, but I haven't tested that.
Is there a possibility to communicate between multiple instances of an application deployed to Cloud Foundry?
I checked the Cloud Foundry API but I couldn't find any mention of this subject.
I already tried Hazelcast but unfortunately, my Cloud Foundry provider doesn't support Multicasting, so I would have to know the IP addresses of every other instance in order to connect.
I think I can't be the only one interested in this.
I recommend you use a messaging service (like RabbitMQ) to communicate between instances of applications. You can also store shared information in a database service or any remote location outside the file system.
It is generally not a good practice to build applications that require this type of communication in the cloud. Each instance should ideally be able to run independently and be stateless.
If you can programmatically access the ip addresses, you can build up the Hazelcast Config object and use that to setup your cluster. You can then rely on tcp-ip discovery.
pseudo code:
List<String> ipAddresses = cloudfoundry.getIps()
Config config = new Config();
config.getJoinConfig().getIpDiscovery().addMembers(ipAddresses)
HazelcastInstance hz = Hazelcast.newHazelcastInstance(config);
You can even load your existing Hazelcast XML configuration and enhance it on the fly using the XmlConfigBuilder.
There might be occasions where the instances need to communicate amongst themselves instead of using an external component to gain efficiency or avoid dependency. One possibility is to use gorouter itself with specific instance id in http with below header.
X-Cf-App-Instance=app-uuid:instanceno-integer
Other option which I am yet to explore is explained in this link
https://ict.swisscom.ch/2018/05/container-networking-with-cloud-foundry/