I am trying to access kubernetes by using the command 'kubectl get pods' on the google cloud platform console and it is throwing the following error,
Unable to connect to the server: dial tcp 35.224.148.100:443: i/o timeout
Please suggest a fix for the same !
Did you use the parameter --enable-private-nodes?
You must to specify authorized list of CIDR: --enable-master-authorized-networks --master-authorized-networks=NETWORK,[NETWORK,…]
Example that autorize all ips:
gcloud container clusters create [cluster-name] \
--zone us-central1-a \
--create-subnetwork name=[subnet-name] \
--enable-ip-alias \
--enable-private-nodes \
--master-ipv4-cidr 172.16.0.0/28 \
--enable-master-authorized-networks \
--master-authorized-networks 0.0.0.0/0
--enable-basic-auth \
--issue-client-certificate \
--machine-type=n1-standard-1 \
--num-nodes=1 \
--node-locations us-central1-a \
--enable-autoscaling \
--max-nodes=5