<p>I have created an LAMP image from the Dockerfile using Jenkins in Ubuntu VM. now I want to push the LAMP image to the gcr.io and also want deploy a Nginx pod using that LAMP image to a GKE cluster on the project.</p>
<p><a href="https://i.stack.imgur.com/vNcrm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vNcrm.png" alt="enter image description here" /></a></p>
<p>Figure: 1</p>
<p>I used Google Kubernetes engine Plugins to connect with the Cluster as per above figure:1. I'm not understand how I need to define Kubernetes Manifests for the pic above. I got below error while build the configuration:</p>
<pre><code>tagged gcr.io/xxx-xxx-xxx/lamp-stack:v0
FATAL: /var/lib/jenkins/workspace/LAMP/test.yaml
java.nio.file.NoSuchFileException: /var/lib/jenkins/workspace/LAMP/test.yaml
    at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
    at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
    at java.base/java.nio.file.Files.newByteChannel(Files.java:370)
    at java.base/java.nio.file.Files.newByteChannel(Files.java:421)
    at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
    at java.base/java.nio.file.Files.newInputStream(Files.java:155)
    at hudson.FilePath.newInputStreamDenyingSymlinkAsNeeded(FilePath.java:2109)
    at hudson.FilePath.read(FilePath.java:2094)
    at hudson.FilePath.read(FilePath.java:2086)
    at com.google.jenkins.plugins.k8sengine.Manifests.loadFile(Manifests.java:192)
    at com.google.jenkins.plugins.k8sengine.Manifests.&lt;init&gt;(Manifests.java:155)
    at com.google.jenkins.plugins.k8sengine.Manifests.&lt;init&gt;(Manifests.java:149)
    at com.google.jenkins.plugins.k8sengine.Manifests.fromFile(Manifests.java:173)
    at com.google.jenkins.plugins.k8sengine.KubernetesEngineBuilder.addMetricsLabel(KubernetesEngineBuilder.java:300)
    at com.google.jenkins.plugins.k8sengine.KubernetesEngineBuilder.perform(KubernetesEngineBuilder.java:266)
    at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    at hudson.model.Build$BuildExecution.build(Build.java:197)
    at hudson.model.Build$BuildExecution.doRun(Build.java:163)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
    at hudson.model.Run.execute(Run.java:1907)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
</code></pre>

Mahboob
<p>You are getting a the exception <code>java.nio.file.NoSuchFileException</code> because Jenkins is a self-contained Java-based program.</p>
<p>This error is thrown when an attempt is made to access a file that does not exist, in this case <code>/var/lib/jenkins/workspace/LAMP/test.yaml</code>. You have to make sure the file does exists in that path.</p>
<p>You can take a look at this <a href="https://cloud.google.com/solutions/jenkins-on-kubernetes-engine" rel="nofollow noreferrer">link</a> for further information on how to use Jenkins on Kubernetes Engine.</p>
<p>For adding the image to Container Registry you have to <code>docker tag</code> and <code>docker push</code> the image to the gcr.io hostname. You can find how to do it in the <a href="https://cloud.google.com/container-registry/docs/quickstart#add-image" rel="nofollow noreferrer">documentation</a>.</p>
