docs:virtualizacion:docker:kops_cluster_mamagement

¡Esta es una revisión vieja del documento!


kops cluster management

export NAME=myfirstcluster.k8s.local
export KOPS_STATE_STORE=s3://kubernetesaws-example-com-state-store
$ ssh-keygen -t rsa -f /home/vagrant/.ssh/id_rsa -q -P ""
$ kops create cluster --zones us-west-2a ${NAME}
$ kops create secret --name myfirstcluster.k8s.local sshpublickey admin -i ~/.ssh/id_rsa.pub
$ kops update cluster ${NAME} --yes

Cluster is starting.  It should be ready in a few minutes.

Suggestions:
 * validate cluster: kops validate cluster
 * list nodes: kubectl get nodes --show-labels
 * ssh to the master: ssh -i ~/.ssh/id_rsa admin@api.myfirstcluster.k8s.local
 * the admin user is specific to Debian. If not using Debian please use the appropriate user based on your OS.
 * read about installing addons at: https://github.com/kubernetes/kops/blob/master/docs/addons.md.
$ kops validate cluster
Using cluster from kubectl context: myfirstcluster.k8s.local

Validating cluster myfirstcluster.k8s.local

INSTANCE GROUPS
NAME			ROLE	MACHINETYPE	MIN	MAX	SUBNETS
master-us-west-2a	Master	m3.medium	1	1	us-west-2a
nodes			Node	t2.medium	2	2	us-west-2a

NODE STATUS
NAME						ROLE	READY
ip-172-20-32-120.us-west-2.compute.internal	master	True
ip-172-20-51-89.us-west-2.compute.internal	node	True
ip-172-20-58-56.us-west-2.compute.internal	node	True

Your cluster myfirstcluster.k8s.local is ready
$ kubectl get nodes
NAME                                          STATUS    ROLES     AGE       VERSION
ip-172-20-32-120.us-west-2.compute.internal   Ready     master    23m       v1.10.3
ip-172-20-51-89.us-west-2.compute.internal    Ready     node      22m       v1.10.3
ip-172-20-58-56.us-west-2.compute.internal    Ready     node      21m       v1.10.3
$ kubectl cluster-info
Kubernetes master is running at https://api-myfirstcluster-k8s-lo-hqulii-1192082441.us-west-2.elb.amazonaws.com
KubeDNS is running at https://api-myfirstcluster-k8s-lo-hqulii-1192082441.us-west-2.elb.amazonaws.com/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
  • docs/virtualizacion/docker/kops_cluster_mamagement.1535237922.txt.gz
  • Última modificación: 2018/08/25 22:58
  • por rodolfo