[AWS] Kubernetes on AWS
2023-09-14 09:00:46 时间
Key Points
-
AWS EKS is a service that we can use to set up Kubernetes.
-
The
deployment.yaml
file is used to specify how our pods should be created. - The
service.yaml
file is used to specify how our pods are exposed.
deployment.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: my-app labels: app: my-app spec: replicas: 2 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: simple-node image: YOUR_DOCKER_HUB/simple-node ports: - containerPort: 80
service.yaml
apiVersion: v1 kind: Service metadata: name: my-app labels: run: my-app spec: ports: - port: 80 protocol: TCP selector: run: my-app
Creating a Kubernetes Cluster on AWS
Creating an EKS Cluster
- Create cluster in EKS
- Create and specify role for Kubernetes cluster
- Enable public access
Creating a Node Group
- Add Node Group in the newly-created cluster
- Create and specify role for IAM role for node group
- Create and specify SSH key for node group
- Set instance type to
t3.micro
for cost-savings as we learn how to use Kubernetes - Specify desired number of nodes
![Docker images are loaded from the container registry into Kubernetes pods. Access to the pods are exposed to consumers through a service.](https://video.udacity-data.com/topher/2020/April/5e92462d_cdnd-c3-l4-kubernetes/cdnd-c3-l4-kubernetes.jpg)
Docker images are loaded from the container registry into Kubernetes pods. Access to the pods are exposed to consumers through a service.
相关文章
- [AWS] IAM Best Practices
- [AWS] Assign a public IP address to an EC2 instance after launched
- [AWS] Architecture Patterns - Deployment and Management
- [AWS -DA] SAM & CDK
- [AWS] WebSockets with API Gateway
- [AWS] Lambda Invocation types
- [AWS] Lab: Docker and CodeCommit Part 1
- [AWS] SQS - Create a Queue
- [AWS] EC2 - Create Auto Scaling group
- AWS EKS 如何调整 Persistent Volumes (EBS)大小
- [ 云计算 | AWS ] 亚马逊云科技核心服务之计算服务(Part1:AWS EC2 星巴克为什么横向排队)