Create HostEndpoint resouce using calico operator

252 views Asked by At

Is it possible to create resource:

apiVersion: projectcalico.org/v3
kind: HostEndpoint

using calico operator? I want to get rid of calicoctl.

2

There are 2 answers

1
Fariya Rahmat On BEST ANSWER

It is possible only with calicoctl to create a host endpoint resource.

As mentioned in the document:

For each host endpoint that you want Calico to secure, you’ll need to create a host endpoint object in etcd. Use the calicoctl create command to create a host endpoint resource (HostEndpoint).

There are two ways to specify the interface that a host endpoint should refer to. You can either specify the name of the interface or its expected IP address. In either case, you’ll also need to know the name given to the Calico node running on the host that owns the interface; in most cases this will be the same as the hostname of the host.

0
goutham On

If you're trying to autocreate hostEndpoints for all the worker nodes. You could patch the kubecontrollersconfiguration resource directly without calicoctl.

kubectl patch kubecontrollersconfiguration default --type=merge --patch='{"spec": {"controllers": {"node": {"hostEndpoint": {"autoCreate": "Enabled"}}}}}'