I’ve been able to spin up a managed Kubernetes cluster and can deploy workloads as pods. 🎉
Running doctl kubernetes cluster get <UUID> -o json
reports, among other things, that the cluster_subnet
is 10.244.0.0/16
. According to the documentation, cluster_subnet
is The range of IP addresses in the overlay network of the Kubernetes cluster in CIDR notation.
That means that all my pods will be assigned an IP from that range, right?
Question: is the cluster_subnet
always 10.244.0.0/16
? If I spin up a new cluster, am I guaranteed a cluster_subnet
of 10.244.0.0/16
? Is there a way for me to choose a different cluster_subnet
, say, during cluster creation?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hello @caffeinestorm,
Firstly, congratulations on spinning up a managed Kubernetes cluster and deploying your workloads! 🎉
To address your question on the
cluster_subnet
:Is the
cluster_subnet
always 10.244.0.0/16?10.244.0.0/16
CIDR. However, it’s crucial to understand that this is an implementation detail that can change based on the needs or updates in the platform. Thus, it’s not advisable to rely on this specific range for any of your configurations or operations.If I spin up a new cluster, am I guaranteed a
cluster_subnet
of 10.244.0.0/16?Can I choose a different
cluster_subnet
during cluster creation?cluster_subnet
range during the cluster creation process.A significant point to remember is that in DOKS (DigitalOcean Managed Kubernetes), there are more efficient and robust mechanisms to identify workloads beyond just IPs. It’s advisable to leverage those mechanisms to ensure the resilience and stability of your deployments.
For example, one option here is to use a service. A Kubernetes
Service
is an abstraction that defines a logical set of pods and a way to access them. When creating a service, Kubernetes will allocate a unique IP address (ClusterIP) which remains static for the lifecycle of the service. This means that you don’t have to rely on the individual IPs of pods, but rather on the Service’s ClusterIP or its DNS name.I hope this clarifies your queries. Please let us know if you have any other questions or need further assistance!
Best,
Bobby
Heya,
In Kubernetes, the
10.244.0.0/16
range is a common default for pod networking, but it is not immutable and may vary depending on the setup or the cloud provider. In DigitalOcean Kubernetes (DOKS),10.244.0.0/16
is the default range, if I am not mistaken.If I spin up a new cluster, am I guaranteed a
cluster_subnet
of10.244.0.0/16
? Yes, but it’s always a good idea to check after creating the cluster or consulting DigitalOcean’s latest documentation as there is no guaratnee that is the case.Is there a way for me to choose a different
cluster_subnet
, say, during cluster creation? As of now, users are not allowed to specify custom pod or service CIDR ranges during cluster creation.