Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How should I use the cluster-api-ipam-provider-in-cluster? #79

Closed
lintest01 opened this issue Mar 6, 2023 · 1 comment
Closed

How should I use the cluster-api-ipam-provider-in-cluster? #79

lintest01 opened this issue Mar 6, 2023 · 1 comment

Comments

@lintest01
Copy link

lintest01 commented Mar 6, 2023

I apologize for my lack of knowledge, but I am trying to use your cluster-api-ipam-provider-in-cluster and have encountered some issues.
I created a cluster using the instructions on this page about Docker:
https://cluster-api.sigs.k8s.io/user/quick-start.html

Then I ran the following commands and confirmed that caip-in-cluster-system is running:
git clone https://github.com/telekom/cluster-api-ipam-provider-in-cluster
cd cluster-api-ipam-provider-in-cluster
kubectl apply -k config/default

Based on the README.md you provided, I created an inclusterippool-sample. Here are the specific details I used:
apiVersion: ipam.cluster.x-k8s.io/v1alpha1
kind: InClusterIPPool
metadata:
name: inclusterippool-sample
spec:
subnet: 10.0.0.0/24
gateway: 10.0.0.1

Next, I tried to create a pod to verify that its IP address is within the inclusterippool, but it is clear that the pod's IP is not within the inclusterippool. Here is an example of the pod:
apiVersion: v1
kind: Pod
metadata:
name: test-pod
spec:
containers:
- name: test-container
image: nginx

I have reviewed the information you provided and did not see any indication that it can only be used in specific environments, such as AWS or vSphere.
So, how can I verify that IPAM is functioning correctly? If there is any misunderstanding in the above content, please correct me. Alternatively, could you provide an example of how to use it so I can verify it? Thank you for your help.

@schrej
Copy link
Member

schrej commented Mar 6, 2023

Hey there. I think there is in fact a misunderstanding here. This IPAM provider is not intended for managing IP addresses of Pods within a cluster.
Cluster API is about deploying entire clusters, and this IPAM provider can be used to assign IP addresses to Machines (which end up as Nodes in a deployed cluster) that are deployed by Cluster API. Have a look at the CAPI Proposal about the IPAM contract for more details.

It requires support from the infrastructure provider in order to be used. At the moment support is implemented in CAPV, and I have an open PR for CAPM3 as well. It is most useful for on-premise providers, but could also be used in a cloud environment.

@kubernetes-sigs kubernetes-sigs locked and limited conversation to collaborators Mar 6, 2023
@schrej schrej converted this issue into discussion #80 Mar 6, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants