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.
