I ran the install script:
export KUBERNETES_PROVIDER=aws; curl -sS https://get.k8s.io | bash
And it set up my cluster just fine. The problem is that the master was not on an elastic ip. So I went to the VPC settings in the AWS management console and bound it to one. This obviously changed the ip of the master which I correspondingly changed in .kube/config
.
Now whenever I try to do anything with kubectl (e.g. kubectl get pods
) I get the error: error: couldn't read version from server: Get https://NEW_IP/api: x509: certificate is valid for OLD_IP, 10.0.0.1, not NEW_IP
.
Is there a correct way to bind the master to an elastic IP? How do I fix this?
Solved by doing: kube-down
then export MASTER_RESERVED_IP=[NEW_IP]
and then kube-up