patch поменять  параметр  в  deployment но  походу  я со  сляйсоми  не  дружу  может  кто то из  мудрых  поможет  
                  
                  
                  kubectl patch deployment web-app-kuku-com -n stage -p '{"spec":{"template":{"spec":{"containers":{"- env":{"readinessProbe":{"failureThreshold": "10"}}}}}}}'
                  
                  
                  The request is invalid: patch: Invalid value: "map[spec:map[template:map[spec:map[containers:map[- env:map[readinessProbe:map[failureThreshold:10]]]]]]]": cannot restore slice from map
                  
                  
                  а  вот  сам  yaml  вернее  часть  его  
                  
                  
                  apiVersion: apps/v1
                  
                  
                  kind: Deployment
                  
                  
                  metadata:
                  
                  
                    annotations:
                  
                  
                    creationTimestamp: "2021-12-15T12:18:36Z"
                  
                  
                    generation: 1
                  
                  
                    labels:
                  
                  
                      app: web-app-kuku-com
                  
                  
                      app.kubernetes.io/managed-by: Helm
                  
                  
                      chart: web-app-0.1.0
                  
                  
                      customer: kuku-com
                  
                  
                      release: stage
                  
                  
                      type: web-app
                  
                  
                    name: web-app-kuku-com
                  
                  
                    namespace: stage
                  
                  
                    resourceVersion: "411398331"
                  
                  
                    selfLink: /apis/apps/v1/namespaces/stage/deployments/web-app-kuku-com
                  
                  
                    uid: d8a5aa68-7df1-4dd7-9ad9-ba60ba802b40
                  
                  
                  spec:
                  
                  
                    progressDeadlineSeconds: 600
                  
                  
                    replicas: 1
                  
                  
                    revisionHistoryLimit: 5
                  
                  
                    selector:
                  
                  
                      matchLabels:
                  
                  
                        release: stage
                  
                  
                        service: web-app-kuku-com
                  
                  
                    strategy:
                  
                  
                      rollingUpdate:
                  
                  
                        maxSurge: 1
                  
                  
                        maxUnavailable: 0
                  
                  
                      type: RollingUpdate
                  
                  
                    template:
                  
                  
                      metadata:
                  
                  
                        creationTimestamp: null
                  
                  
                        labels:
                  
                  
                          app: web-app-kuku-com
                  
                  
                      spec:
                  
                  
                        containers:
                  
                  
                        - env:
                  
                  
                          - name: ENV
                  
                  
                            value: stage
                  
                  
                          - name: NAME
                  
                  
                            value: kuku-com
                  
                  
                          image: kuku.img
                  
                  
                          imagePullPolicy: Always
                  
                  
                          livenessProbe:
                  
                  
                            failureThreshold: 3
                  
                  
                            httpGet:
                  
                  
                              path: /?healthpw_tok_2644
                  
                  
                              port: 8082
                  
                  
                              scheme: HTTP
                  
                  
                            initialDelaySeconds: 300
                  
                  
                            periodSeconds: 20
                  
                  
                            successThreshold: 1
                  
                  
                            timeoutSeconds: 300
                  
                  
                          name: web-app
                  
                  
                          ports:
                  
                  
                          - containerPort: 8080
                  
                  
                            name: web
                  
                  
                            protocol: TCP
                  
                  
                          - containerPort: 8082
                  
                  
                            name: ui
                  
                  
                            protocol: TCP
                  
                  
                          readinessProbe:
                  
                  
                            failureThreshold: 3
                  
                  
                            httpGet:
                  
                  
                              path: /?healthpw_tok_2644
                  
                  
                              port: 8082
                  
                  
                              scheme: HTTP
                  
                  
                            initialDelaySeconds: 300
                  
                  
                            periodSeconds: 20
                  
                  
                            successThreshold: 1
                  
                  
                            timeoutSeconds: 300
                  
                  
                          resources:
                  
                  
                            limits:
                  
                  
                              cpu: 500m
                  
                  
                              memory: 2Gi
                  
                  
                            requests:
                  
                  
                              cpu: 100m
                  
                  
                              memory: 1Gi
                  
                  
                          terminationMessagePath: /dev/termination-log
                  
                  
                          terminationMessagePolicy: File
                  
                  
                        dnsPolicy: ClusterFirst
                  
                  
                        enableServiceLinks: false
                  
                  
                        restartPolicy: Always
                  
                  
                        schedulerName: default-scheduler
                  
                  
                        securityContext: {}
                  
                  
                        terminationGracePeriodSeconds: 30
                  
                  
                  status:
                  
                  
                    availableReplicas: 1
                  
                  
                    conditions:
                  
                  
                    - lastTransitionTime: "2021-12-15T12:18:36Z"
                  
                  
                      lastUpdateTime: "2021-12-15T12:23:39Z"
                  
                  
                      message: ReplicaSet "web-app-kuku-com-5dcdf69cf9" has successfully progressed.
                  
                  
                      reason: NewReplicaSetAvailable
                  
                  
                      status: "True"
                  
                  
                
скобочге кривые
Обсуждают сегодня