Installing Kubernetes with lung

content:


  • Platform: AWS


Installing Kubernetes with lung

1.aws configure

Installation awscli:

pip install awscli


Create IAM User, to get access_key_idwell access_key. To configure authentication:

aws configure


2. Install kops

MacOSX

brew install kops


Linux

wget https://github.com/kubernetes/kops/releases/download/1.10.0/kops-linux-amd64
chmod +x kops-linux-amd64
mv kops-linux-amd64 /usr/local/bin/kops


3. route53Create a DNS domain

domain: k8s-dev.mydomain.com

aws route53 create-hosted-zone --name k8s-dev.mydomain.com --caller-reference 1
  • Can be created in Dashboard
  • The k8s-dev.mydomain.comhost zone's NS record is added to mydomain.comthe record


4. Create a S3 storage

S3 is used to store the cluster configuration

aws s3 mb s3://cluster.k8s-dev.mydomain.com


5. Create a cluster

export NAME=cluster.k8s-dev.mydomain.com
export KOPS_STAT_STORE=s3://cluster.k8s-dev.mydomain.com


Creating the cluster configuration

kops create cluster $NAME --zones=ap-east-1a --node-count=2 --node-size=m5.large --master-size=t3.micro
  • --zones: Need to determine the basis of the region on the zone, for example: ap-east-1ainstead ap-east-1.

View the cluster configuration

kops edit cluster $NAME


Update cluster

kops update cluster --yes $NAME


Configuring statement

kops export kubecfg $NAME


Viewing Cluster

kops get cluster

Guess you like

Origin www.cnblogs.com/tiantiandas/p/Installing-Kubernetes-with-kops.html