Skip to content

HaHatake/Kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 

Repository files navigation

Kubernetes

Kubernetes test repository.
Lets learn container management :)

Reference

Goal

Make Tetris web server powered by Rancher Kubernetes on AWS and Azure.

This method needs

AWS account (permittion to create EC2 instans)

First step ( Launch Rancher Kubernetes Engine instans and Node instans)

Launch Amazon Linux 2 EC2 2 instans and Azure 1 instans. Access by ssh each other instans.

updates
sudo yum -y update

Install Docker

read the docker web
https://docs.docker.com/install/

install docker and autolaunch
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo systemctl enable docker

Install RKE(:Rancher Kubernetes Engine) on 1 EC2 instans

read how to install rke
https://rancher.com/announcing-rke-lightweight-kubernetes-installer/

sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher

Access RKE site

Assuming that EC2 security group permitted access HTTP(80)

in your brouser access your EC2 IPaddress and setup new password

2019-02-20 16 07 09

setup your EC2 server IPaddress
this server IPaddress is accessed from each other clastered servers
!Reminder : default EC2 instans haven't static Groval IPaddress.Elastic IP atatche the rancher master EC2 instans. 2019-02-20 16 13 36

Hello RKE

RKE start page is opended! and add cluster
2019-02-20 16 33 27

create Rancher EC2 nodes

select EC2
2019-02-21 9 53 06

Cluster setting
2019-02-21 11 12 38

create Template

select template plus mark
Enter your AWS key information
2019-02-21 11 34 50

if you encounted the error Failed to communicate with API server: Get https://yourIPaddress/api/v1/componentstatuses?timeout=30s: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

read this thred rancher/rancher#15319

Enter VPC network setting
2019-02-21 11 36 50

if you encounted the error "AuthFailure: AWS was not able to validate the provided access credentials"
maybe your EC2 instans's time was wrong. check ntp synchronization.

moniterling Cluster

if you encounted the error "[network] Host [masuternode IPaddress] is not able to connect to the following ports: [your nodes IPaddress]. Please check network policies and firewall rules"

check your Security Group. Permit any port (e.g.79) from master node IPaddress.

This cluster is currently Unavailable; areas that interact directly with it will not be available until the API is ready.

if you encounted the error "skipped because they could not be contacted"

About

Kubernetes test repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published