<p>Currently I am trying to implement examples for both continuous delivery and deployment using Kubernetes and Jenkins. I have successfully implemented continuous deployment. Automatically, my REST API is deploying to my Kubernetes cluster via Jenkins. Both test and prod namespaces are deploying.</p>

<p>Now I am trying to implement continuous delivery by making a manual user approval before releasing to prod namespace. Means implement a manual approval by implementing one switch in between test and prod environments.</p>

<p>For more clarity I am adding here screenshots I got while I am exploring,</p>

<p><strong>Continuous Delivery &amp; Continuous Deployment Difference in Manual Approval</strong></p>

<p><a href="https://i.stack.imgur.com/bkg3m.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bkg3m.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/pzd9y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pzd9y.png" alt="enter image description here"></a></p>

<p>Here my confusion is that, when I am implementing the delivery, how I can add the user interaction?  Do I need to change any parameter in my <code>deployment.yaml</code> or <code>service.yaml</code>? Or do I need to change anything when I am creating my Jenkins pipeline job in Jenkins UI?</p>

<p>I am new to the continuous delivery side. Can anyone suggest any documentation or tutorials or any method to explore please?</p>

Mr.DevEng
<p>You can use the <a href="https://jenkins.io/doc/pipeline/steps/pipeline-input-step/" rel="nofollow noreferrer">Jenkins Input Step</a> to do something like this. Input step coupled with a <code>try/catch</code> will enable you fairly good control over success/failure of the job also.</p>

<p>The <a href="https://support.cloudbees.com/hc/en-us/articles/230922428-Pipeline-How-to-add-an-input-step-that-continues-if-aborted-using-value" rel="nofollow noreferrer">example below is from CloudBees support</a> portal and uses the input box, captures the input and uses that input value to set the success/failure of the current build</p>

<pre><code>def userInput
try {
    userInput = input(
        id: 'Proceed1', message: 'Was this successful?', parameters: [
        [$class: 'BooleanParameterDefinition', defaultValue: true, description: '', name: 'Please confirm you agree with this']
        ])
} catch(err) { // input false
    def user = err.getCauses()[0].getUser()
    userInput = false
    echo "Aborted by: [${user}]"
}

node {
    if (userInput == true) {
        // do something
        echo "this was successful"
    } else {
        // do something else
        echo "this was not successful"
        currentBuild.result = 'FAILURE'
    } 
}
</code></pre>
