Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes 如何获得更多正在运行的Istio副本?_Kubernetes_Istio_Istio Gateway_Istio Operator - Fatal编程技术网

Kubernetes 如何获得更多正在运行的Istio副本?

Kubernetes 如何获得更多正在运行的Istio副本?,kubernetes,istio,istio-gateway,istio-operator,Kubernetes,Istio,Istio Gateway,Istio Operator,我正在尝试升级Kubernetes集群中的节点。当我这样做的时候,我会收到一个通知,上面写着: 命名空间istio系统中的PDB istio入口网关允许0 pod中断 PDB是Pod中断预算。基本上,istio的意思是,它不能松开吊舱,让事情正常运转 关于Istio GitHub的问题,我们有很长的路要走。这个问题已经持续了两年多。大多数讨论都围绕着默认值是错误的这一点展开。很少有变通建议。但大多数都是1.4之前的版本(以及Istiod的引入)。我能找到的与当前版本兼容的最接近的解决方法是Ist

我正在尝试升级Kubernetes集群中的节点。当我这样做的时候,我会收到一个通知,上面写着:

命名空间istio系统中的PDB istio入口网关允许0 pod中断

PDB是Pod中断预算。基本上,istio的意思是,它不能松开吊舱,让事情正常运转

关于Istio GitHub的问题,我们有很长的路要走。这个问题已经持续了两年多。大多数讨论都围绕着默认值是错误的这一点展开。很少有变通建议。但大多数都是1.4之前的版本(以及Istiod的引入)。我能找到的与当前版本兼容的最接近的解决方法是IstioOperator

我尝试了一个补丁操作(在PowerShell中运行):

其中
istio ha patch.yaml
为:

spec:
  components:
    egressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
      name: istio-egressgateway
    ingressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
      name: istio-ingressgateway    
    pilot:
      enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: istio-controlplane
  namespace: istio-system
spec:
  components:    
    ingressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
      name: istio-ingressgateway
    pilot:
      enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
  profile: default
我应用了它,并检查了IstioOperator的yaml,它确实应用于资源的yaml。但是入口吊舱的副本数量没有增加。(它保持在1/1。)

此时,我唯一的选择是卸载Istio,应用我的更新,然后重新安装Istio。(恶心)


是否有办法提高Istio入口网关的副本计数,以便在执行滚动节点升级时保持其运行?

结果表明,如果您没有使用Istio Kubernetes操作符安装Istio,则无法使用我尝试的选项

一旦我卸载了Istio并使用操作员重新安装了它,我就可以让它工作了

虽然我没有使用补丁操作,但我只是执行了一个
kubectl应用-f istio-operator-spec.yaml
其中
istio-operator-spec.yaml
是:

spec:
  components:
    egressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
      name: istio-egressgateway
    ingressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
      name: istio-ingressgateway    
    pilot:
      enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: istio-controlplane
  namespace: istio-system
spec:
  components:    
    ingressGateways:
    - enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
      name: istio-ingressgateway
    pilot:
      enabled: true
      k8s:
        hpaSpec:
          minReplicas: 2
  profile: default

那么
spec.components.ingresgateways.k8s.replicaCount
呢?因此,基本上不要使用
hpaSpec
而是尝试使用
replicaCount