Skip to content

Adding ip address to the SAN certificate for k8s.yaml #3448

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

echo-devnull
Copy link

Adding this ip will make software trust the api server since the ip address of the api server will be in the SAN certificate list

Adding this ip will make software trust the api server since the ip address of the api server will be in the SAN certificate list
@afbjorklund
Copy link
Member

The default address of the apiserver is localhost, even though the node IP is set to the first interface.

    # Replace the server address with localhost, so that it works also from the host
    sed -e "/server:/ s|https://.*:\([0-9]*\)$|https://127.0.0.1:\1|" -i $KUBECONFIG

When doing multiple k8s nodes we need to fix the networking anyway, since the NAT IP is not unique.

When would the IP be used directly, not kubeconfig?

Why do you need to add it to "extra" SANs, explicitely?

[certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local lima-k8s] and IPs [10.96.0.1 192.168.5.15 127.0.0.1]

@@ -112,6 +112,7 @@ provision:
apiServer:
certSANs: # --apiserver-cert-extra-sans
- "127.0.0.1"
- "192.168.5.15"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed (and should not be hardcoded)

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 this pull request may close these issues.

2 participants