0

I am trying kind create cluster --config kind-config.yaml to create a kind cluster using the following kind-config.yaml file:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
  constraints:
    memory: "512m"
    cpu: "4"

But I get this result:

ERROR: failed to create cluster: unable to decode config: yaml: unmarshal errors:
  line 6: field constraints not found in type v1alpha4.Node

What I am trying to do is doing something like bellowing but for a Kind cluster instead of minilube:

minikube start --memory 5120 --cpus=4

best_of_man
  • 643
  • 2
  • 15
  • As the error message says: there does not seem to be an option to set `constraints` on a `node`, and the [documentation](https://kind.sigs.k8s.io/docs/user/configuration/#pernode-options) does not say anything about this either. – Turing85 Dec 30 '22 at 02:46
  • @Turing85: Do you know how can I do something like `minikube start --memory 5120 --cpus=4` for `Kind`? – best_of_man Dec 30 '22 at 02:50
  • 1
    No. You can try `kubectl explain cluster` or `kubectl explain cluster.nodes` (not entirely sure how to address the resource definition properly). This should show all possible configuration options. – Turing85 Dec 30 '22 at 02:55
  • Since kind uses the docket image to set up the cluster we don't think there will be no constraints section in kind cluster creation. You can refer to the [offical kind document](https://kind.sigs.k8s.io/docs/user/configuration/#extra-mounts) – Dharani Dhar Golladasari Dec 30 '22 at 14:39

0 Answers0