Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-15541

DO370-4.16: ch03s02 : step 2.1 - oc exec into deployment instead of a pod

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • DO370 - DO370-O4.16-en-2-20250317
    • DO370
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 3
    • en-US (English)

      Please fill in the following information:


      URL: https://rol.redhat.com/rol/app/courses/do370-4.16/pages/ch03s02
      Reporter RHNID: chetan-rhls
      Section Title:     h2. Guided Exercise: S3 Object Storage                                                                   

      Issue description: The guided exercises gives a oc command to exec in a deployment. Even if the command works for some reason does it qualify to be used as best practice ? 

       

      https://kubernetes.io/docs/reference/kubectl/generated/kubectl_exec/#examples 

       

      I dont think this is a best practice because of ambiguity, permissions, replicas, transitioning issues . FOr example : 

      • A deployment may have multiple replicas (pods). Which one does oc exec choose? It might be nondeterministic (first sorted, last, random, etc.). That may lead you to connect to a pod that’s not what you intended (e.g. a “canary” or failing one).
      • During rolling updates or when pods are in transition, the “selected pod” might be terminating or not the correct version.

       

      Steps to reproduce:

       

      Workaround:

       

      Expected result:

              gls-curriculum-ocp-core@redhat.com PTL - OCP Platform Team
              chetan-rhls Chetan Tiwary
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: