I tried to run a config file to set Falco as my backend webhook. Iam getting this error on trying to run my config file
revaa@revaa-Lenovo-E41-25:~/opa$ kubectl apply -f conflc.yaml
error: unable to recognize "conflc.yaml": no matches for kind "Config" in version "v1"
Here is my config file
apiVersion: v1
kind: Config
clusters:
- name: falco
cluster:
server: http://$FALCO_SERVICE_CLUSTERIP:8765/k8s_audit
contexts:
- context:
cluster: falco
user: ""
name: default-context
current-context: default-context
preferences: {}
users: []
How to fix this?
The object Config
is not a server side configuration. Instead, it is used for your kubectl (in general) to know where it should interact with.
You can check out the documentation about context here. This will let you understand how to manage the cluster with the object Object
inside your local machine.
In the case that you want to add the configuration to your application, what you need is the ConfigMap
, which is the object under Kubernetes server side.
You can check out more information about ConfigMap
in this doc.