zoukankan      html  css  js  c++  java
  • k8s ReplicaSet

    副本集合(ReplicaSet)的作用是,在任何时刻,都维护一个Pod对象数目固定的副本集合,这些Pod对象都相同,通常用于保证可用性。

    不过,k8s官方推荐使用更高层级的概念Deployment,而不是直接用ReplicaSet。

    apiVersion: apps/v1
    kind: ReplicaSet
    metadata:
      name: frontend
      labels:
        app: guestbook
        tier: frontend
    spec:
      # modify replicas according to your case
      replicas: 3
      selector:
        matchLabels:
          tier: frontend
      template:
        metadata:
          labels:
            tier: frontend
        spec:
          containers:
          - name: php-redis
            image: gcr.io/google_samples/gb-frontend:v3
    

      

    在旧版本中,叫ReplicationController

    ReplicaSet支持集合式selector

  • 相关阅读:
    [六省联考2017]相逢是问候
    [CQOI2017]老C的键盘
    [CQOI2017]老C的任务
    [CQOI2017]小Q的棋盘
    <sdoi2017>树点涂色
    三分法
    最长回文子串
    hdu3261
    spoj694
    poj1743
  • 原文地址:https://www.cnblogs.com/yangwenhuan/p/11455913.html
Copyright © 2011-2022 走看看