doitintl / kubeip

Assign static public IPs to Kubernetes nodes (GKE, EKS)

Home Page:https://kubeip.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minor Fix for the sed command in README to be working for macOS users.

Amitk3293 opened this issue · comments

amit:kubeip/ (master✗) $ sed -i -e "s/reserved/$GKE_CLUSTER_NAME/g" -e "s/default-pool/$KUBEIP_NODEPOOL/g" deploy/kubeip-configmap.yaml 

sed: -e: No such file or directory

The error you're seeing is likely due to the differences in the sed command between macOS and Linux.
The -i option in macOS's version of sed expects an extension for backup files, whereas the Linux version does not.

To fix this on macOS, you can provide an empty string after the -i option to avoid creating a backup file:

sed -i '' -e "s/reserved/$GKE_CLUSTER_NAME/g" -e "s/default-pool/$KUBEIP_NODEPOOL/g" deploy/kubeip-configmap.yaml

If you're on Linux, the command you provided should work as-is.

This should be done for all the sed commands.

Not relevant for KubeIP v2 anymore