SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Setup Kubernetes Cluster On AWS Using KOPS
What is Kubernetes?
Kubernetes is a portable, extensible open-source platform for managing
containerized workloads and services, that facilitates both declarative
configuration and automation
Why do I need Kubernetes
• a container platform
• a microservices platform
• a portable cloud platform
• Kubernetes provides a container-centric management environment.
It orchestrates computing, networking, and storage infrastructure on
behalf of user workloads. This provides much of the simplicity of
Platform as a Service (PaaS) with the flexibility of Infrastructure as a
Service (IaaS), and enables portability across infrastructure providers.
What Kubernetes is not
• Does not limit the types of applications supported.
• Does not deploy source code and does not build your application.
• Does not provide application-level services, such as middleware (e.g.,
message buses), data-processing frameworks (for example, Spark),
databases (e.g., mysql), caches, nor cluster storage systems (e.g., Ceph) as
built-in services.
• Does not dictate logging, monitoring, or alerting solutions. It provides
some integrations as proof of concept, and mechanisms to collect and
export metrics.
• Does not provide nor mandate a configuration language/system
(e.g., jsonnet).
• Does not provide nor adopt any comprehensive machine configuration,
maintenance, management, or self-healing systems.
• Additionally, Kubernetes is not a mere orchestration system.
• it eliminates the need for orchestration. The technical definition
of orchestration is execution of a defined workflow: first do A, then B,
then C. In contrast, Kubernetes is comprised of a set of independent,
composable control processes that continuously drive the current
state towards the provided desired state. It shouldn’t matter how you
get from A to C. Centralized control is also not required. This results in
a system that is easier to use and more powerful, robust, resilient,
and extensible.
•
• 1) Ubuntu in AWS
• 2) AWS Client
• 3) Route53 Host
• 4) S3 Bucket
• 5) Install (Kubernetes cli) kubectl
• 6) KOPS
2) AWS Client
login as root
• sudo apt-get update
• apt-get update
• apt-get install awscli
• aws configure
• AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLEAWS
• Secret Access Key [None]:
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
• Default region name [None]: us-east-2
• Default output format [None]: json
Install kubectl -kubectl
• curl -LO https://storage.googleapis.com/kubernetes-
release/release/$(curl -s https://storage.googleapis.com/kubernetes-
release/release/stable.txt)/bin/linux/amd64/kubectl
• chmod +x ./kubectlsudo
• mv ./kubectl /usr/local/bin/kubectl
KOPS
• curl -LO
https://github.com/kubernetes/kops/releases/download/$(curl -s
https://api.github.com/repos/kubernetes/kops/releases/latest | grep
tag_name | cut -d '"' -f 4)/kops-linux-amd64
• chmod +x kops-linux-amd64
• sudo mv kops-linux-amd64 /usr/local/bin/kops
Create ssh key
• ssh-keygen
• default generate /root/.ssh/id_rsa.pub
Create Route53 Host in AWS UI
Create Route53 :
Hostname: k8s.ltts.vpc -- as private vpc
Create S3 Bucket
• aws s3 mb s3://clusters.k8s.ltts.vpc
Expose environment variable:
• export KOPS_STATE_STORE=s3://clusters.k8s.ltts.vpc
Create Kubernetes Cluster
(add --state s3://clusters.k8s.ltts.vpc if required following commands
as additional param, some times VM will not take Env Args)
• kops create cluster --cloud=aws --zones=us-east-2b --
name=useast2.k8s.ltts.vpc --dns-zone=k8s.ltts.vpc --dns private
Update If you want to change Instance Settings
• kops edit ig --name=useast2.k8s.ltts.vpc nodes
• kops edit ig --name=useast2.k8s.ltts.vpc master-us-east-2b
• update cluster useast2.k8s.ltts.vpc --yes
Dashboard
• kubectl apply -f
https://raw.githubusercontent.com/kubernetes/dashboard/master/sr
c/deploy/recommended/kubernetes-dashboard.yaml
• kubectl proxy --port=8080 &
• kubectl get services -o wide
• kubectl cluster-info
• kubectl get nodes
• kops validate cluster
Install Sample Container
• kubectl run sample-nginx --image=nginx --replicas=2 --port=80
• kubectl get pods
• kubectl get deployments
• kubectl expose deployment sample-nginx --port=80 --
type=LoadBalancer
• kubectl config view
Create Service Account & Create
ClusterRoleBinding
• vi sauserbind.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kube-system
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata: name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kube-system
Run this command
• kubectl create -f sauserbind.yaml
Get Token
• kubectl -n kube-system describe secret $(kubectl -n kube-system get
secret | grep admin-user | awk '{print $1}’)
View Dashboard Cluster
• http://master_public_ip /ui
Delete Cluster
• kops delete cluster useast2.k8s.ltts.vpc --yes
Setup Kubernetes Cluster On AWS Using KOPS

Weitere ähnliche Inhalte

Was ist angesagt?

ACS & vSphere Draft
ACS & vSphere DraftACS & vSphere Draft
ACS & vSphere DraftAaron Delp
 
Hashicorp @ JUST EAT - Part 2
Hashicorp @ JUST EAT - Part 2Hashicorp @ JUST EAT - Part 2
Hashicorp @ JUST EAT - Part 2Andrew Brown
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018girish goudar
 
Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기
Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기
Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기창훈 정
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Amazon Web Services
 
What is serveless?
What is serveless? What is serveless?
What is serveless? Provectus
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes Provectus
 
Containerization with Microsoft Azure
Containerization with Microsoft AzureContainerization with Microsoft Azure
Containerization with Microsoft AzureAbhimanyu Singhal
 
AWS Connect 2017 - Container (feat. AWS)
AWS Connect 2017 -  Container (feat. AWS)AWS Connect 2017 -  Container (feat. AWS)
AWS Connect 2017 - Container (feat. AWS)smalltown
 
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)Diacode
 
Continuous Deployment to the Cloud using Spinnaker
Continuous Deployment to the Cloud using SpinnakerContinuous Deployment to the Cloud using Spinnaker
Continuous Deployment to the Cloud using SpinnakerTim Ysewyn
 
Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事smalltown
 
Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1Zhipeng Huang
 
Azure virtual machine-network
Azure virtual machine-networkAzure virtual machine-network
Azure virtual machine-networkThi Nguyen Dinh
 
Orchestrating VM & Container Deployments
Orchestrating VM & Container DeploymentsOrchestrating VM & Container Deployments
Orchestrating VM & Container DeploymentsLars Wander
 
Spinnaker for Azure
Spinnaker for AzureSpinnaker for Azure
Spinnaker for AzureLarry Guger
 
vBrownBag @ VMworld - Apache CloudStack (ACS) & vSphere
vBrownBag @ VMworld - Apache CloudStack (ACS) & vSpherevBrownBag @ VMworld - Apache CloudStack (ACS) & vSphere
vBrownBag @ VMworld - Apache CloudStack (ACS) & vSphereAaron Delp
 
AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNNguyen Anh Tu
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...Amazon Web Services
 
Navigating in the sea of containers in azure when to choose which service and...
Navigating in the sea of containers in azure when to choose which service and...Navigating in the sea of containers in azure when to choose which service and...
Navigating in the sea of containers in azure when to choose which service and...Karl Ots
 

Was ist angesagt? (20)

ACS & vSphere Draft
ACS & vSphere DraftACS & vSphere Draft
ACS & vSphere Draft
 
Hashicorp @ JUST EAT - Part 2
Hashicorp @ JUST EAT - Part 2Hashicorp @ JUST EAT - Part 2
Hashicorp @ JUST EAT - Part 2
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018
 
Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기
Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기
Packer + Ansible을 이용한 AMI 생성 및 AutoScaling Group 이미지 교체 이야기
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
 
What is serveless?
What is serveless? What is serveless?
What is serveless?
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes
 
Containerization with Microsoft Azure
Containerization with Microsoft AzureContainerization with Microsoft Azure
Containerization with Microsoft Azure
 
AWS Connect 2017 - Container (feat. AWS)
AWS Connect 2017 -  Container (feat. AWS)AWS Connect 2017 -  Container (feat. AWS)
AWS Connect 2017 - Container (feat. AWS)
 
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
 
Continuous Deployment to the Cloud using Spinnaker
Continuous Deployment to the Cloud using SpinnakerContinuous Deployment to the Cloud using Spinnaker
Continuous Deployment to the Cloud using Spinnaker
 
Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事Kubernetes User Group: 維運 Kubernetes 的兩三事
Kubernetes User Group: 維運 Kubernetes 的兩三事
 
Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1Storage Is Not Virtualized Enough - part 1
Storage Is Not Virtualized Enough - part 1
 
Azure virtual machine-network
Azure virtual machine-networkAzure virtual machine-network
Azure virtual machine-network
 
Orchestrating VM & Container Deployments
Orchestrating VM & Container DeploymentsOrchestrating VM & Container Deployments
Orchestrating VM & Container Deployments
 
Spinnaker for Azure
Spinnaker for AzureSpinnaker for Azure
Spinnaker for Azure
 
vBrownBag @ VMworld - Apache CloudStack (ACS) & vSphere
vBrownBag @ VMworld - Apache CloudStack (ACS) & vSpherevBrownBag @ VMworld - Apache CloudStack (ACS) & vSphere
vBrownBag @ VMworld - Apache CloudStack (ACS) & vSphere
 
AWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHNAWS Elastic Container Service - DockerHN
AWS Elastic Container Service - DockerHN
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
 
Navigating in the sea of containers in azure when to choose which service and...
Navigating in the sea of containers in azure when to choose which service and...Navigating in the sea of containers in azure when to choose which service and...
Navigating in the sea of containers in azure when to choose which service and...
 

Ähnlich wie Setup Kubernetes Cluster On AWS Using KOPS

Aws container webinar day 1
Aws container webinar day 1Aws container webinar day 1
Aws container webinar day 1HoseokSeo7
 
DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with KubernetesOleg Chunikhin
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-finalMichel Schildmeijer
 
Container orchestration k8s azure kubernetes services
Container orchestration  k8s azure kubernetes servicesContainer orchestration  k8s azure kubernetes services
Container orchestration k8s azure kubernetes servicesRajesh Kolla
 
Hybrid architecture solutions with kubernetes and the cloud native stack
Hybrid architecture solutions with kubernetes and the cloud native stackHybrid architecture solutions with kubernetes and the cloud native stack
Hybrid architecture solutions with kubernetes and the cloud native stackKublr
 
Turn up the Heat with OpenStack and Kubernetes
Turn up the Heat with OpenStack and Kubernetes Turn up the Heat with OpenStack and Kubernetes
Turn up the Heat with OpenStack and Kubernetes Michael Schulz
 
Best Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesBest Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesQAware GmbH
 
Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)sriram_rajan
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesVishal Biyani
 
Centralizing Kubernetes and Container Operations
Centralizing Kubernetes and Container OperationsCentralizing Kubernetes and Container Operations
Centralizing Kubernetes and Container OperationsKublr
 
Application portability with kubernetes
Application portability with kubernetesApplication portability with kubernetes
Application portability with kubernetesOleg Chunikhin
 
Sebastien goasguen cloud stack and docker
Sebastien goasguen   cloud stack and dockerSebastien goasguen   cloud stack and docker
Sebastien goasguen cloud stack and dockerShapeBlue
 
ProxySQL on Kubernetes
ProxySQL on KubernetesProxySQL on Kubernetes
ProxySQL on KubernetesRené Cannaò
 
Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.Nills Franssens
 

Ähnlich wie Setup Kubernetes Cluster On AWS Using KOPS (20)

Aws container webinar day 1
Aws container webinar day 1Aws container webinar day 1
Aws container webinar day 1
 
DevOps in AWS with Kubernetes
DevOps in AWS with KubernetesDevOps in AWS with Kubernetes
DevOps in AWS with Kubernetes
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Kubernetes on aws
Kubernetes on awsKubernetes on aws
Kubernetes on aws
 
Container orchestration k8s azure kubernetes services
Container orchestration  k8s azure kubernetes servicesContainer orchestration  k8s azure kubernetes services
Container orchestration k8s azure kubernetes services
 
Hybrid architecture solutions with kubernetes and the cloud native stack
Hybrid architecture solutions with kubernetes and the cloud native stackHybrid architecture solutions with kubernetes and the cloud native stack
Hybrid architecture solutions with kubernetes and the cloud native stack
 
Turn up the Heat with OpenStack and Kubernetes
Turn up the Heat with OpenStack and Kubernetes Turn up the Heat with OpenStack and Kubernetes
Turn up the Heat with OpenStack and Kubernetes
 
Best Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesBest Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes Services
 
Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)Elastic Kubernetes Services (EKS)
Elastic Kubernetes Services (EKS)
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev Kubernetes Intro @HaufeDev
Kubernetes Intro @HaufeDev
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Centralizing Kubernetes and Container Operations
Centralizing Kubernetes and Container OperationsCentralizing Kubernetes and Container Operations
Centralizing Kubernetes and Container Operations
 
Application portability with kubernetes
Application portability with kubernetesApplication portability with kubernetes
Application portability with kubernetes
 
Sebastien goasguen cloud stack and docker
Sebastien goasguen   cloud stack and dockerSebastien goasguen   cloud stack and docker
Sebastien goasguen cloud stack and docker
 
AKS components
AKS componentsAKS components
AKS components
 
ProxySQL on Kubernetes
ProxySQL on KubernetesProxySQL on Kubernetes
ProxySQL on Kubernetes
 
Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.Making sense of containers, docker and Kubernetes on Azure.
Making sense of containers, docker and Kubernetes on Azure.
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 

Kürzlich hochgeladen

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

Kürzlich hochgeladen (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Setup Kubernetes Cluster On AWS Using KOPS

  • 1. Setup Kubernetes Cluster On AWS Using KOPS
  • 2. What is Kubernetes? Kubernetes is a portable, extensible open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation
  • 3. Why do I need Kubernetes • a container platform • a microservices platform • a portable cloud platform • Kubernetes provides a container-centric management environment. It orchestrates computing, networking, and storage infrastructure on behalf of user workloads. This provides much of the simplicity of Platform as a Service (PaaS) with the flexibility of Infrastructure as a Service (IaaS), and enables portability across infrastructure providers.
  • 4. What Kubernetes is not • Does not limit the types of applications supported. • Does not deploy source code and does not build your application. • Does not provide application-level services, such as middleware (e.g., message buses), data-processing frameworks (for example, Spark), databases (e.g., mysql), caches, nor cluster storage systems (e.g., Ceph) as built-in services. • Does not dictate logging, monitoring, or alerting solutions. It provides some integrations as proof of concept, and mechanisms to collect and export metrics. • Does not provide nor mandate a configuration language/system (e.g., jsonnet). • Does not provide nor adopt any comprehensive machine configuration, maintenance, management, or self-healing systems. • Additionally, Kubernetes is not a mere orchestration system.
  • 5. • it eliminates the need for orchestration. The technical definition of orchestration is execution of a defined workflow: first do A, then B, then C. In contrast, Kubernetes is comprised of a set of independent, composable control processes that continuously drive the current state towards the provided desired state. It shouldn’t matter how you get from A to C. Centralized control is also not required. This results in a system that is easier to use and more powerful, robust, resilient, and extensible. •
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. • 1) Ubuntu in AWS • 2) AWS Client • 3) Route53 Host • 4) S3 Bucket • 5) Install (Kubernetes cli) kubectl • 6) KOPS
  • 13. 2) AWS Client login as root • sudo apt-get update • apt-get update • apt-get install awscli • aws configure • AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLEAWS • Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY • Default region name [None]: us-east-2 • Default output format [None]: json
  • 14. Install kubectl -kubectl • curl -LO https://storage.googleapis.com/kubernetes- release/release/$(curl -s https://storage.googleapis.com/kubernetes- release/release/stable.txt)/bin/linux/amd64/kubectl • chmod +x ./kubectlsudo • mv ./kubectl /usr/local/bin/kubectl
  • 15. KOPS • curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64 • chmod +x kops-linux-amd64 • sudo mv kops-linux-amd64 /usr/local/bin/kops
  • 16. Create ssh key • ssh-keygen • default generate /root/.ssh/id_rsa.pub
  • 17. Create Route53 Host in AWS UI Create Route53 : Hostname: k8s.ltts.vpc -- as private vpc Create S3 Bucket • aws s3 mb s3://clusters.k8s.ltts.vpc Expose environment variable: • export KOPS_STATE_STORE=s3://clusters.k8s.ltts.vpc
  • 18. Create Kubernetes Cluster (add --state s3://clusters.k8s.ltts.vpc if required following commands as additional param, some times VM will not take Env Args) • kops create cluster --cloud=aws --zones=us-east-2b -- name=useast2.k8s.ltts.vpc --dns-zone=k8s.ltts.vpc --dns private Update If you want to change Instance Settings • kops edit ig --name=useast2.k8s.ltts.vpc nodes • kops edit ig --name=useast2.k8s.ltts.vpc master-us-east-2b • update cluster useast2.k8s.ltts.vpc --yes
  • 19. Dashboard • kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/sr c/deploy/recommended/kubernetes-dashboard.yaml • kubectl proxy --port=8080 & • kubectl get services -o wide • kubectl cluster-info • kubectl get nodes • kops validate cluster
  • 20. Install Sample Container • kubectl run sample-nginx --image=nginx --replicas=2 --port=80 • kubectl get pods • kubectl get deployments • kubectl expose deployment sample-nginx --port=80 -- type=LoadBalancer • kubectl config view
  • 21. Create Service Account & Create ClusterRoleBinding • vi sauserbind.yaml apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kube-system apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: admin-user roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: admin-user namespace: kube-system Run this command • kubectl create -f sauserbind.yaml
  • 22. Get Token • kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}’) View Dashboard Cluster • http://master_public_ip /ui Delete Cluster • kops delete cluster useast2.k8s.ltts.vpc --yes