that make sense
can you explain this to me and sorry for taking this long I'm just little
bit confused and thanks for your help and appreciate your patience
when I mountpath this directory /usr/local/tomcat/webapps I don't get an
empty directory and can see all my subdirectories, folders and files inside
it but I get this error
HTTP Status 404 - /monta
*type* Status report
*message* */monta*
*description* *The requested resource is not available.*
------------------------------
Apache Tomcat/8.0.41
But like you said before when I mountpath this directory
/usr/local/tomcat/webapps/monta i get an empty monta directory !!!
So why do i get that error since /usr/local/tomcat/webapps has all the
necessary subdirectories, folders and files.
Show you again my scripts
FROM tomcat:8-jre8
ADD monta.war /usr/local/tomcat/webapps/
CMD ["catalina.sh", "run"]
--------------------------
spec:
containers:
- image: gcr.io/projectid/web-application-image:v
<http://gcr.io/projectid/demo:v1>
name: web-pod
ports:
- containerPort: 8080
volumeMounts:
- name: persistent-storage
mountPath: /usr/local/tomcat/webapps
volumes:
- name: persistent-storage
persistentVolumeClaim:
claimName: web-pv-claim
On Wednesday, March 1, 2017 at 2:58:43 AM UTC-5, Tim Hockin wrote:
>
> You can't multi-mount any volume that models as a block device,
> including GCE PD. It just isn't supported by any filesystems in
> common use. Unless you have something like NFS or gluster, this won't
> work.
>
> On Tue, Feb 28, 2017 at 9:36 PM, Montassar Dridi
> <[email protected] <javascript:>> wrote:
> > I'm running multiple web pods for the same application and I have this
> > folder where clients can upload their files.
> > So I want that folder in this directory
> > /usr/local/tomcat/webapps/ROOT/uploadfiles to be shared between all the
> web
> > pods,
> > in case the client login to a random session within a specific web POD1
> and
> > upload some files there, can find them next time he logs in to another
> > random session within another web POD2
> >
> > On Wednesday, March 1, 2017 at 12:22:42 AM UTC-5, Tim Hockin wrote:
> >>
> >> Yeah, I'm trying to figure out what you are trying to achieve with a
> >> volume? Volumes don't share files that already exist, they are a
> >> place to put files. So you can copy it from somewhere in your image
> >> to that shared dir, or get it from git or something...
> >>
> >> On Tue, Feb 28, 2017 at 9:04 PM, Montassar Dridi
> >> <[email protected]> wrote:
> >> > so I should add the war file after the mount , no need for the
> >> > Dockerfile at
> >> > the beginning
> >> >
> >> > On Tuesday, February 28, 2017 at 11:59:14 PM UTC-5, Rodrigo Campos
> >> > wrote:
> >> >>
> >> >> Then your are mounting the volume where your war file is.
> >> >>
> >> >> Then, as mount works (nothing special about containers), you lose
> >> >> visibility of the war file and now see your volume.
> >> >>
> >> >> That will never work.
> >> >>
> >> >> On Wednesday, March 1, 2017, Montassar Dridi <[email protected]>
> >> >> wrote:
> >> >>>
> >> >>> I thought i did when I created the Dockerfile for the web
> application
> >> >>> docker image that I pushed to the google container registry and
> then
> >> >>> listed
> >> >>> it in my web application kubernetes depolyment yaml file :
> >> >>>
> >> >>> FROM tomcat:8-jre8
> >> >>> ADD sample.war /usr/local/tomcat/webapps/
> >> >>> CMD ["catalina.sh", "run"]
> >> >>> --------------------------
> >> >>> spec:
> >> >>> containers:
> >> >>> - image: gcr.io/projectid/web-application-image:v
> >> >>> name: web-pod
> >> >>> ports:
> >> >>> - containerPort: 8080
> >> >>> volumeMounts:
> >> >>> - name: persistent-storage
> >> >>> mountPath: /usr/local/tomcat/webapps
> >> >>> volumes:
> >> >>> - name: persistent-storage
> >> >>> persistentVolumeClaim:
> >> >>> claimName: web-pv-claim
> >> >>>
> >> >>>
> >> >>> On Tuesday, February 28, 2017 at 11:43:50 PM UTC-5, Tim Hockin
> wrote:
> >> >>>>
> >> >>>> Put some stuff in that directory? Where is the content coming
> from?
> >> >>>> How do you expect it to end up in that directory?
> >> >>>>
> >> >>>> On Tue, Feb 28, 2017 at 8:37 PM, Montassar Dridi
> >> >>>> <[email protected]> wrote:
> >> >>>> > right !! I got an empty directory !!
> >> >>>> > so what should i do ?
> >> >>>> > On Tuesday, February 28, 2017 at 11:30:58 PM UTC-5, Tim Hockin
> >> >>>> > wrote:
> >> >>>> >>
> >> >>>> >> If you mount an empty dir (be that a new PD or an emptyDir) you
> >> >>>> >> will,
> >> >>>> >> in fact, have an empty directory - which would give you exactly
> >> >>>> >> what
> >> >>>> >> you're seeing, wouldn't it?
> >> >>>> >>
> >> >>>> >> On Tue, Feb 28, 2017 at 6:44 PM, Montassar Dridi
> >> >>>> >> <[email protected]> wrote:
> >> >>>> >> > No errors is showing in the log pods !!!
> >> >>>> >> > I used the same volume structure for MYSQL database and was
> able
> >> >>>> >> > to
> >> >>>> >> > share
> >> >>>> >> > any file in var/lib/mysql directory between the database pods
> >> >>>> >> > with
> >> >>>> >> > no
> >> >>>> >> > issue
> >> >>>> >> >
> >> >>>> >> > On Tuesday, February 28, 2017 at 9:35:19 PM UTC-5, Rodrigo
> >> >>>> >> > Campos
> >> >>>> >> > wrote:
> >> >>>> >> >>
> >> >>>> >> >> But what is the error kubernetes shows in kubectl pod
> describe?
> >> >>>> >> >> What
> >> >>>> >> >> about
> >> >>>> >> >> the containers logs? Etc. This is a crucial part, nothing
> can't
> >> >>>> >> >> really
> >> >>>> >> >> be
> >> >>>> >> >> said without it.
> >> >>>> >> >>
> >> >>>> >> >> Also, as a general guidance, try to isolate the problem.
> Maybe
> >> >>>> >> >> try
> >> >>>> >> >> running
> >> >>>> >> >> an example for using volumes (that maybe use a public docker
> >> >>>> >> >> image), to
> >> >>>> >> >> understand how to use them first. Also, you may want to run
> >> >>>> >> >> just a
> >> >>>> >> >> sleep or
> >> >>>> >> >> something and connect to the pod and see what's there, etc.
> >> >>>> >> >>
> >> >>>> >> >> On Tuesday, February 28, 2017, Montassar Dridi
> >> >>>> >> >> <[email protected]>
> >> >>>> >> >> wrote:
> >> >>>> >> >>>
> >> >>>> >> >>> I used the emptyDir...get the same error
> >> >>>> >> >>>
> >> >>>> >> >>> On Tuesday, February 28, 2017 at 8:45:19 PM UTC-5,
> Montassar
> >> >>>> >> >>> Dridi
> >> >>>> >> >>> wrote:
> >> >>>> >> >>>>
> >> >>>> >> >>>> I'm using Google Cloud Platform container engine and
> Google
> >> >>>> >> >>>> persistent
> >> >>>> >> >>>> disk as persistent volume
> >> >>>> >> >>>> apiVersion: v1
> >> >>>> >> >>>> kind: PersistentVolumeClaim
> >> >>>> >> >>>> metadata:
> >> >>>> >> >>>> name: web-pv-claim
> >> >>>> >> >>>> labels:
> >> >>>> >> >>>> name: web-pod
> >> >>>> >> >>>> version: v1
> >> >>>> >> >>>> spec:
> >> >>>> >> >>>> accessModes:
> >> >>>> >> >>>> - ReadWriteOnce
> >> >>>> >> >>>> resources:
> >> >>>> >> >>>> requests:
> >> >>>> >> >>>> storage: 10Gi
> >> >>>> >> >>>> ------------------
> >> >>>> >> >>>> spec:
> >> >>>> >> >>>> containers:
> >> >>>> >> >>>> - image: gcr.io/projectid/demo:v1
> >> >>>> >> >>>> name: web-pod
> >> >>>> >> >>>> ports:
> >> >>>> >> >>>> - containerPort: 8080
> >> >>>> >> >>>> volumeMounts:
> >> >>>> >> >>>> - name: persistent-storage
> >> >>>> >> >>>> mountPath: /usr/local/tomcat/webapps
> >> >>>> >> >>>> volumes:
> >> >>>> >> >>>> - name: persistent-storage
> >> >>>> >> >>>> persistentVolumeClaim:
> >> >>>> >> >>>> claimName: web-pv-claim
> >> >>>> >> >>>> volumes:
> >> >>>> >> >>>> - name: web-persistent-storage
> >> >>>> >> >>>> persistentVolumeClaim:
> >> >>>> >> >>>> claimName: web-pv-claim
> >> >>>> >> >>>>
> >> >>>> >> >>>> I get this error from the browser
> >> >>>> >> >>>>
> >> >>>> >> >>>> This page can’t be found
> >> >>>> >> >>>>
> >> >>>> >> >>>> No webpage was found for the web address:
> >> >>>> >> >>>> https://35.185.13.141/
> >> >>>> >> >>>>
> >> >>>> >> >>>> HTTP ERROR 404
> >> >>>> >> >>>>
> >> >>>> >> >>>> On Tuesday, February 28, 2017 at 8:24:22 PM UTC-5, Rodrigo
> >> >>>> >> >>>> Campos
> >> >>>> >> >>>> wrote:
> >> >>>> >> >>>>>
> >> >>>> >> >>>>> Also, if you just want to share a folder, you can use an
> >> >>>> >> >>>>> emptyDir.
> >> >>>> >> >>>>> It
> >> >>>> >> >>>>> really
> >> >>>> >> >>>>> depends on what you want, what you should use. But as Tim
> >> >>>> >> >>>>> says,
> >> >>>> >> >>>>> more
> >> >>>> >> >>>>> info is
> >> >>>> >> >>>>> definitely needed to *try* to help.
> >> >>>> >> >>>>>
> >> >>>> >> >>>>> Please make sure to see log messages, read docs, etc. And
> >> >>>> >> >>>>> then,
> >> >>>> >> >>>>> if
> >> >>>> >> >>>>> not
> >> >>>> >> >>>>> working,
> >> >>>> >> >>>>> ask again with a more clear picture. Without a single
> error
> >> >>>> >> >>>>> shown,
> >> >>>> >> >>>>> not
> >> >>>> >> >>>>> even the
> >> >>>> >> >>>>> claims, cloud provider, etc. is really hard to help :-(
> >> >>>> >> >>>>>
> >> >>>> >> >>>>>
> >> >>>> >> >>>>> On Tue, Feb 28, 2017 at 05:19:19PM -0800, 'Tim Hockin'
> via
> >> >>>> >> >>>>> Kubernetes
> >> >>>> >> >>>>> user discussion and Q&A wrote:
> >> >>>> >> >>>>> > Not enough information: What cloud environment? What
> does
> >> >>>> >> >>>>> > the PV
> >> >>>> >> >>>>> > claim object look like? What does "doesn't load" mean?
> >> >>>> >> >>>>> >
> >> >>>> >> >>>>> > On Tue, Feb 28, 2017 at 5:14 PM, Montassar Dridi
> >> >>>> >> >>>>> > <[email protected]> wrote:
> >> >>>> >> >>>>> > > Hello!!
> >> >>>> >> >>>>> > > The Dockerfile for my web application image, that I
> >> >>>> >> >>>>> > > deployed
> >> >>>> >> >>>>> > > within
> >> >>>> >> >>>>> > > Kubernetes, looks like this :
> >> >>>> >> >>>>> > > FROM tomcat:8-jre8
> >> >>>> >> >>>>> > > ADD sample.war /usr/local/tomcat/webapps/
> >> >>>> >> >>>>> > > CMD ["catalina.sh", "run"]
> >> >>>> >> >>>>> > >
> >> >>>> >> >>>>> > > It works fine without volumes!!
> >> >>>> >> >>>>> > > But when I try something like the script below, so I
> can
> >> >>>> >> >>>>> > > include
> >> >>>> >> >>>>> > > volumes, my
> >> >>>> >> >>>>> > > website doesn't load :
> >> >>>> >> >>>>> > > spec:
> >> >>>> >> >>>>> > > containers:
> >> >>>> >> >>>>> > > - image: gcr.io/projectid/demo:v1
> >> >>>> >> >>>>> > > name: web-pod
> >> >>>> >> >>>>> > > ports:
> >> >>>> >> >>>>> > > - containerPort: 8080
> >> >>>> >> >>>>> > > volumeMounts:
> >> >>>> >> >>>>> > > - name: persistent-storage
> >> >>>> >> >>>>> > > mountPath: /usr/local/tomcat/webapps
> >> >>>> >> >>>>> > > volumes:
> >> >>>> >> >>>>> > > - name: persistent-storage
> >> >>>> >> >>>>> > > persistentVolumeClaim:
> >> >>>> >> >>>>> > > claimName: web-pv-claim
> >> >>>> >> >>>>> > >
> >> >>>> >> >>>>> > > I just wanna share a folder between my web pods ?!?!
> >> >>>> >> >>>>> > >
> >> >>>> >> >>>>> > > --
> >> >>>> >> >>>>> > > You received this message because you are subscribed
> to
> >> >>>> >> >>>>> > > the
> >> >>>> >> >>>>> > > Google
> >> >>>> >> >>>>> > > Groups
> >> >>>> >> >>>>> > > "Kubernetes user discussion and Q&A" group.
> >> >>>> >> >>>>> > > To unsubscribe from this group and stop receiving
> emails
> >> >>>> >> >>>>> > > from
> >> >>>> >> >>>>> > > it,
> >> >>>> >> >>>>> > > send an
> >> >>>> >> >>>>> > > email to [email protected].
> >> >>>> >> >>>>> > > To post to this group, send email to
> >> >>>> >> >>>>> > > [email protected].
> >> >>>> >> >>>>> > > Visit this group at
> >> >>>> >> >>>>> > > https://groups.google.com/group/kubernetes-users.
> >> >>>> >> >>>>> > > For more options, visit
> >> >>>> >> >>>>> > > https://groups.google.com/d/optout.
> >> >>>> >> >>>>> >
> >> >>>> >> >>>>> > --
> >> >>>> >> >>>>> > You received this message because you are subscribed to
> >> >>>> >> >>>>> > the
> >> >>>> >> >>>>> > Google
> >> >>>> >> >>>>> > Groups "Kubernetes user discussion and Q&A" group.
> >> >>>> >> >>>>> > To unsubscribe from this group and stop receiving
> emails
> >> >>>> >> >>>>> > from
> >> >>>> >> >>>>> > it,
> >> >>>> >> >>>>> > send an email to [email protected].
> >> >>>> >> >>>>> > To post to this group, send email to
> >> >>>> >> >>>>> > [email protected].
> >> >>>> >> >>>>> > Visit this group at
> >> >>>> >> >>>>> > https://groups.google.com/group/kubernetes-users.
> >> >>>> >> >>>>> > For more options, visit
> >> >>>> >> >>>>> > https://groups.google.com/d/optout.
> >> >>>> >> >>>
> >> >>>> >> >>> --
> >> >>>> >> >>> You received this message because you are subscribed to the
> >> >>>> >> >>> Google
> >> >>>> >> >>> Groups
> >> >>>> >> >>> "Kubernetes user discussion and Q&A" group.
> >> >>>> >> >>> To unsubscribe from this group and stop receiving emails
> from
> >> >>>> >> >>> it,
> >> >>>> >> >>> send
> >> >>>> >> >>> an
> >> >>>> >> >>> email to [email protected].
> >> >>>> >> >>> To post to this group, send email to
> >> >>>> >> >>> [email protected].
> >> >>>> >> >>> Visit this group at
> >> >>>> >> >>> https://groups.google.com/group/kubernetes-users.
> >> >>>> >> >>> For more options, visit https://groups.google.com/d/optout.
>
> >> >>>> >> >
> >> >>>> >> > --
> >> >>>> >> > You received this message because you are subscribed to the
> >> >>>> >> > Google
> >> >>>> >> > Groups
> >> >>>> >> > "Kubernetes user discussion and Q&A" group.
> >> >>>> >> > To unsubscribe from this group and stop receiving emails from
> >> >>>> >> > it,
> >> >>>> >> > send
> >> >>>> >> > an
> >> >>>> >> > email to [email protected].
> >> >>>> >> > To post to this group, send email to
> >> >>>> >> > [email protected].
> >> >>>> >> > Visit this group at
> >> >>>> >> > https://groups.google.com/group/kubernetes-users.
> >> >>>> >> > For more options, visit https://groups.google.com/d/optout.
> >> >>>> >
> >> >>>> > --
> >> >>>> > You received this message because you are subscribed to the
> Google
> >> >>>> > Groups
> >> >>>> > "Kubernetes user discussion and Q&A" group.
> >> >>>> > To unsubscribe from this group and stop receiving emails from
> it,
> >> >>>> > send
> >> >>>> > an
> >> >>>> > email to [email protected].
> >> >>>> > To post to this group, send email to
> [email protected].
> >> >>>> > Visit this group at
> >> >>>> > https://groups.google.com/group/kubernetes-users.
> >> >>>> > For more options, visit https://groups.google.com/d/optout.
> >> >>>
> >> >>> --
> >> >>> You received this message because you are subscribed to the Google
> >> >>> Groups
> >> >>> "Kubernetes user discussion and Q&A" group.
> >> >>> To unsubscribe from this group and stop receiving emails from it,
> send
> >> >>> an
> >> >>> email to [email protected].
> >> >>> To post to this group, send email to [email protected].
> >> >>> Visit this group at
> https://groups.google.com/group/kubernetes-users.
> >> >>> For more options, visit https://groups.google.com/d/optout.
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "Kubernetes user discussion and Q&A" group.
> >> > To unsubscribe from this group and stop receiving emails from it,
> send
> >> > an
> >> > email to [email protected].
> >> > To post to this group, send email to [email protected].
> >> > Visit this group at https://groups.google.com/group/kubernetes-users.
>
> >> > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "Kubernetes user discussion and Q&A" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to [email protected] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > Visit this group at https://groups.google.com/group/kubernetes-users.
> > For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.