I am trying Egress Operator for restricting the egress calls based on domain. I am using Ubuntu 18
Hyper-V VM and I have all prerequisites:
- Azure repository to push images
Kubebuilder
for code generationKustomize
for building the Kubernetes manifestsCoreDns
(default with k3s) pod runningGolang
:go version go1.16.5 linux/amd64
But while Testing locally make run
is giving below error:
root@Ubuntu18-Virtual-Machine:~/egress-operator# make run
go: creating new go.mod: module tmp
go get: added sigs.k8s.io/controller-tools v0.2.4
/root/go/bin/controller-gen object:headerFile=./hack/boilerplate.go.txt paths="./..."
Error: go [list -e -json -compiled=true -test=false -export=false -deps=true -find=false -tags ignore_autogenerated -- ./...]: exit status 2: # runtime/cgo
cgo: exec gcc: exec: "gcc": executable file not found in $PATH
Also after editing coredns deployment and coredns Corefile in ConfigMap, as mentioned in coredns plugin setup I am seeing blow error while executing make deploy
command:
root@Ubuntu18-Virtual-Machine:~/egress-operator# make deploy IMG=MY_REPO/egress-operator:v0.1
go: creating new go.mod: module tmp
go get: added sigs.k8s.io/controller-tools v0.2.4
/root/go/bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
Error: go [list -e -json -compiled=true -test=false -export=false -deps=true -find=false -tags ignore_autogenerated -- ./...]: exit status 2: # runtime/cgo
cgo: exec gcc: exec: "gcc": executable file not found in $PATH
Can someone let me know how to resolve this ?