通过rancher UI回滚应用版本报错:deployments.apps "cx-view" not found

Rancher Server 设置

  • Rancher 版本:2.6.3
  • 安装选项 (Docker install/Helm Chart): Docker install
    • 如果是 Helm Chart 安装,需要提供 Local 集群的类型(RKE1, RKE2, k3s, EKS, 等)和版本:
  • 在线或离线部署:离线

下游集群信息

  • Kubernetes 版本: 1.19
  • Cluster Type (Local/Downstream): 导入
    • 如果 Downstream,是什么类型的集群?(自定义/导入或为托管 等): 导入

用户信息

  • 登录用户的角色是什么? (管理员/集群所有者/集群成员/项目所有者/项目成员/自定义):管理员
    • 如果自定义,自定义权限集:

主机操作系统:

问题描述:
单机版安装rancher,导入一个已经已有的k8s集群。上面启动这一些应用。我通过rancher的UI实现一个deployment的版本回退,却提示我deployment并不存在。
重现步骤:


image

结果:

预期结果:

截图:

其他上下文信息:
业务deploy的yaml文件:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: cx-view
  namespace: cx
spec:
  replicas: ${replica_cx_view}
  selector:
    matchLabels:
      app: cx-view
  template:
    metadata:
      labels:
        app: cx-view
    spec:
      hostAliases:
      - ip: "${nacos_server_ip}"
        hostnames:
        - "${nacos_server_name}"
      #- ip: "${cx_service_server_ip}"
      #  hostnames:
      #  - "${cx_service_server_name}"
      #  - "${cx_app_ic_server_name}"
      #- ip: "${cx_app_mdisk_server_ip}"
      #  hostnames:
      #  - "${cx_app_mdisk_server_name}"
      imagePullSecrets:
      - name: hub-westone-com-cn   
      nodeSelector:
        cxapp: "true"
      containers:
      - name: cx-client-view
        image: ${cx_client_view_version}
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: localtime
          mountPath: /etc/localtime
          readOnly: true
        env:
        - name: FORMAT_MESSAGES_PATTERN_DISABLE_LOOKUPS
          valueFrom:
            configMapKeyRef:
              name: cx-env-config
              key: format_messages
        - name: LOG4J_log4j2_formatMsgNoLookups
          valueFrom:
            configMapKeyRef:
              name: cx-env-config
              key: log4j_log4j2
        - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
          valueFrom:
            configMapKeyRef:
              name: cx-env-config
              key: sw_agent
        - name: DOWNLOAD_BASE_URL
          valueFrom:
            configMapKeyRef:
              name: cx-env-config
              key: download_base_url
        - name: RELOAD_FLAG
          value: "${SUB_TIMESTAMP}"
        ports:
        - containerPort: 8100

      - name: cx-docs-view
        image: ${cx_docs_view_version}
        imagePullPolicy: IfNotPresent
        env:
        - name: FORMAT_MESSAGES_PATTERN_DISABLE_LOOKUPS
          valueFrom:
            configMapKeyRef:
              name: cx-env-config
              key: format_messages
        - name: LOG4J_log4j2_formatMsgNoLookups
          valueFrom:
            configMapKeyRef:
              name: cx-env-config
              key: log4j_log4j2
        - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
          valueFrom:
            configMapKeyRef:
              name: cx-env-config
              key: sw_agent
        ports:
        - containerPort: 8107
        
      volumes:
      - name: localtime
        hostPath:
          path: "/etc/localtime"
      - name: logfile
        emptyDir: {}
      - name: filebeat-config
        configMap:
          name: cx-log-filebeat-config
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: cx-view
  name: cx-view
  namespace: cx
spec:
  type: ClusterIP
  selector:
    app: cx-view
  ports:
  - name: cx-client-view-bp
    port: 8100
    protocol: TCP
    targetPort: 8100
  - name: cx-docs-view-bp
    port: 8107
    protocol: TCP
    targetPort: 8107

日志


这肯定是个Bug,看看这个issue:Rollback option on workload does not work · Issue #4664 · rancher/dashboard · GitHub

从milestone上看,你需要升级rancher。

感谢,伙计,你提供的iissue链接应该是我这个问题,但是我看问题以及关闭,但是没看到具体哪个版本的rancher会修这个bug ,你了解吗?

另外一个问题,我上周末在github上发了一个issue,[BUG] The data size of the securet object is not equal ,between created by the "kubectl create secret generic" command and generated by rancher UI "read from file" · Issue #39652 · rancher/rancher · GitHub
你有时间的时候 帮忙看看 遇到过类似的问题吗?

非常感谢。

Github issue上面有milestone标识,一般就是对应的修复版本。