Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom ClusterID #170

Open
aprohorov-callsign opened this issue Oct 11, 2023 · 4 comments
Open

Custom ClusterID #170

aprohorov-callsign opened this issue Oct 11, 2023 · 4 comments

Comments

@aprohorov-callsign
Copy link

Hey team!
I was perplexed with Cluster ID parameter. How can I get it with Helm?
I have CastAI-Agent helm installed and it registers my EKS cluster and generates Cluster ID. If I tried to pass STATIC_CLUSTER_ID parameter to the Agent it failed with the "cluster not found" error.

What is the right way to install Agent and Kvisor without manually copy-pasting Cluster ID from UI?

@anjmao
Copy link
Collaborator

anjmao commented Nov 13, 2023

Hi @aprohorov-callsign

Few questions:

  1. Do I understand correctly that you are generating STATIC_CLUSTER_ID yourself? We do not support passing your own clusterID if it doesn't exist.
  2. Are you interested only in security or autoscaling and security?

Few options:

  1. Use terraform to automate both agent and kvisor install. https://docs.cast.ai/docs/terraform-provider
  2. Install agent without passing clusterID. Once it's installed fetch cluster from public api using curl and get clusterID with jq. https://api.cast.ai/v1/spec/#/ExternalClusterAPI/ExternalClusterAPIListClusters

@aprohorov-callsign
Copy link
Author

Hey @anjmao,
thanks for reply!

Sure, let me clarify my needs.

As for now, we have installed CastAI agents in all our EKS clusters (like 30 in total and it's pretty frequently creating/destroying) and I need to add kvisor to extend functionality.
CastAI agents were installed perfectly via flux I'm very happy with that.
But to deploy kvisor I have to retrieve somehow cluster_id.

I saw Terraform provider, but managing dynamic Kubernetes resources by Terraform against GitOps principals and our company policy.

So I thought I could generate a cluster ID and use it for all CastAI deployments, but the CastAI agent doesn't register a cluster if cluster_id was provided.

@anjmao
Copy link
Collaborator

anjmao commented Nov 28, 2023

Hi @aprohorov-callsign

STATIC_CLUSTER_ID should valid be uuid. You can try to install k8s agent with STATIC_CLUSTER_ID by setting id of kube-system namespace uuid.

Our public https://api.cast.ai/v1/spec/#/ExternalClusterAPI/ExternalClusterAPIRegisterCluster allows to create cluster with custom uuid.

If that works you should be able to provide the same cluster id to kvisor.

@anjmao anjmao changed the title ClusterID Custom ClusterID Nov 28, 2023
@aprohorov-callsign
Copy link
Author

Hi @anjmao

I've tried STATIC_CLUSTER_ID and it doesn't work. Because STATIC_CLUSTER_ID means the cluster with that ID is already registered on the CastAI side.

I need a feature to provide STATIC_CLUSTER_ID that will be used to register a new cluster on the CastAI side if it doesn't exist.

OR

The CastAI-Agent should somehow publish the CLUSTER_ID after it's registered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants