Operating System Based Error in Script - MacOS (Results in not creating agents)
Closed this issue · 1 comments
fawazsiddiqi commented
Hey there! So I am using IBM Cloud Monitoring which utilizes the following script to attach agents to the worker nodes
I noticed at a point the script is unable to complete it's entire run, resulting in the pods not being created. And this is related to the OS, for instance, I am running the script from MacOS.
* Detecting operating system
* Downloading yamls files to the temp directory: /tmp/sysdig-agent-k8s.vcBKWT
* Downloading Sysdig cluster role yaml
* Downloading Sysdig config map yaml
* Downloading Sysdig daemonset v2 yaml
* Downloading Sysdig daemonset slim v2 yaml
* Downloading Sysdig kmod-thin-agent-slim daemonset
* Creating namespace: ibm-observe
kubectl create namespace failed!
Error from server (AlreadyExists): namespaces "ibm-observe" already exists. Continuing...
* Creating sysdig-agent serviceaccount in namespace: ibm-observe
kubectl create serviceaccount failed!
error: failed to create serviceaccount: serviceaccounts "sysdig-agent" already exists. Continuing...
* Creating sysdig-agent clusterrole and binding
clusterrole.rbac.authorization.k8s.io/sysdig-agent unchanged
kubectl create clusterrolebinding failed!
error: failed to create clusterrolebinding: clusterrolebindings.rbac.authorization.k8s.io "sysdig-agent" already exists. Continuing...
* Creating sysdig-agent secret using the ACCESS_KEY provided
kubectl create secret failed!
error: failed to create secret secrets "sysdig-agent" already exists. Re-creating secret...
secret "sysdig-agent" deleted
secret/sysdig-agent created
* Retrieving the Cluster ID and Cluster Name
* Setting cluster name as ibm-observe/c114-e-eu-de-containers-cloud-ibm-com:31871/IAM#mohammad.fawaz.siddiqi@ibm.com
* Setting ibm.containers-kubernetes.cluster.id c9u23bpf0286cot8a5e0
* Updating agent configmap and applying to cluster
* Setting tags
* Setting collector endpoint
* Adding additional configuration to dragent.yaml
* Enabling Prometheus
configmap/sysdig-agent configured
Slim agent selected
sed: -e: No such file or directory
As you can see in the last line the script breaks at sed: -e: No such file or directory
Unsure of the fix but happy to support to gain more findings
fawazsiddiqi commented
Similar issue at