zoukankan      html  css  js  c++  java
  • [AWS] Kubernetes on AWS

    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

    1. Create cluster in EKS
    2. Create and specify role for Kubernetes cluster
    3. Enable public access

    Creating a Node Group

    1. Add Node Group in the newly-created cluster
    2. Create and specify role for IAM role for node group
    3. Create and specify SSH key for node group
    4. Set instance type to t3.micro for cost-savings as we learn how to use Kubernetes
    5. 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.

    Docker images are loaded from the container registry into Kubernetes pods. Access to the pods are exposed to consumers through a service.

     
  • 相关阅读:
    <c:forEach 的常用整理
    <div>
    HTML <td> 标签的 rowspan 属性
    ap-client.xml要配
    @Autowired
    hasResultError
    使用 EclEmma 进行覆盖测试
    IE调试网页之三:使用 F12 工具控制台查看错误和状态 (Windows)
    different between<A Href> and <jsp: forward>
    <button>与<input type="button">的区别
  • 原文地址:https://www.cnblogs.com/Answer1215/p/14620084.html
Copyright © 2011-2022 走看看