Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install-cni.sh should use cacert instead of --insecure #93

Closed
anfernee opened this issue Aug 18, 2020 · 1 comment · Fixed by #373
Closed

install-cni.sh should use cacert instead of --insecure #93

anfernee opened this issue Aug 18, 2020 · 1 comment · Fixed by #373

Comments

@anfernee
Copy link
Member

token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
node_url="https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}/api/v1/nodes/${HOSTNAME}"
response=$(curl -k -s -H "Authorization: Bearer $token" $node_url)
ipv4_subnet=$(echo $response | jq '.spec.podCIDR')

we are using curl -k which is insecure. We should use --cacert with the ca cert in the same folder as token file.

@anfernee
Copy link
Member Author

cc @bcheung

jingyuanliang added a commit to jingyuanliang/netd that referenced this issue Oct 14, 2024
It appears some "expected errors" still pop up causing user confusion,
so do the redirection, restore -m as some further safeguard, and since
we're touching this line, fix GoogleCloudPlatform#93 along the way.
jingyuanliang added a commit to jingyuanliang/netd that referenced this issue Oct 15, 2024
It appears some "expected errors" still pop up causing user confusion,
so do the redirection, restore -m as some further safeguard, and since
we're touching this line, fix GoogleCloudPlatform#93 along the way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant