community-content icon indicating copy to clipboard operation
community-content copied to clipboard

Setup your own scalable Kubernetes cluster with the Terraform provider for Hetzner Cloud

Open nekitoss opened this issue 10 months ago • 1 comments

Problem

While going over this great tutorial i've stuck on step 6: when executing on MacOs Sequoia 15.5 this command from tutorial: sed -i -e '/^kind: ConfigMap.*/i \ \ compute-full-forwarded-for: \"true\"\n \ use-forwarded-headers: \"true\"\n \ use-proxy-protocol: \"true\"' /tmp/nginx.yaml

i'm, receiving an error:

sed: 1: "/^kind: ConfigMap.*/i   ...": extra characters after \ at the
end of i command

Suggested Fix

Please check and fix that command for MacOs As alternative it would be great to see some expandable explanations what you need to replace/edit, because for people who are not using sed command every day it is not obvious what the result should be

nekitoss avatar May 31 '25 18:05 nekitoss

Tried to execute command using some online tool: looks like it ignores null value in data: null So it results in incorrect and incorrectly aligned

data: null
 compute-full-forwarded-for: "true"
  use-forwarded-headers: "true"
  use-proxy-protocol: "true"

(which also may be a fault of online tool, i don't have currently linux system to check)

After fixing that part so it now looks like

data:
  compute-full-forwarded-for: "true"
  use-forwarded-headers: "true"
  use-proxy-protocol: "true"

I've tried to apply it with kubectl apply -f /tmp/nginx.yaml And i've received next error:

Error from server (BadRequest): error when creating "/tmp/nginx.yaml":
DaemonSet in version "v1" cannot be handled as a DaemonSet: strict
decoding error: unknown field "spec.strategy"

As far as i understand - the part under DaemonSet

strategy:
  rollingUpdate:
    maxUnavailable: 1
  type: RollingUpdate

should be deleted

If i'm correct - maybe documentation needs update on that too

nekitoss avatar May 31 '25 19:05 nekitoss

Thank you for your feedback @nekitoss! I've updated the tutorial accordingly.

svenja11 avatar Jul 31 '25 13:07 svenja11