Giter VIP home page Giter VIP logo

tz-kubernetes's Introduction

Make a kubernetes loadbalancer(ELB) in AWS from vagrant

Features

	1. Make a node app on docker hub
	2. Make an elb for a K8S master and two nodes in AWS through kubectl, kops and awscli
	3. Set firewall and a service domain in Route53 through awscli
	4. Install K8S admin UI

Preparations

	1. Make a sub domain in route53 ex) topzone.biz
		dig NS topzone.biz

 	2. Add an aws user with permissions
		AmazonEC2FullAccess
		AmazonRoute53FullAccess
		AmazonS3FullAccess
		IAMFullAccess
		AmazonVPCFullAccess
	
	3. Set AWS access key
		vi ~/tz-kubernetes/etc/.aws/config	
		vi ~/tz-kubernetes/etc/.aws/credentials
		
		* Check available aws zone
		  aws ec2 describe-availability-zones --region us-west-1
		  
	4. Make s3
		vi ~/scripts/elb.sh
		aws s3api create-bucket --bucket kops-state-tz
		
	5. change your docker_hub id / password
		* https://hub.docker.com
		vi ~/scripts/docker.sh
		docker login -u doohee323 -p 1234

Execution

	vagrant up
	#vagrant destroy -f && vagrant up
	#vagrant provision
	#vagrant ssh
	
	# log
	vi ./exec.log

Run

	- Access to node in docker from host 
 		curl http://192.168.82.171:49160
 	- Access to aws elb which is generated by k8s
 		curl http://test.nextransfer.com

	- K8S UI

Remove All resources in AWS

	vagrant ssh
	kops delete cluster --name topzone.biz --yes --state=s3://kops-state-tz

Improvement

	You can improve all script using a env. file. Not implemented yet.  
		vi ./etc/env.properties

tz-kubernetes's People

Contributors

doohee323 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.