From b26190b58b148f75e9f7db91680c60ac1a8747cf Mon Sep 17 00:00:00 2001 From: Michael Nelson Date: Tue, 17 Jan 2017 18:05:32 +1100 Subject: [PATCH] Note about the need to fix permissions for a hostPath volume mount #2260 This is a work-around for #2260 until the underlying problem is addressed (https://github.com/kubernetes/kubernetes/issues/2630). --- .../stateful-application/basic-stateful-set.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/tutorials/stateful-application/basic-stateful-set.md b/docs/tutorials/stateful-application/basic-stateful-set.md index ef15bf3607..2a72070ac8 100644 --- a/docs/tutorials/stateful-application/basic-stateful-set.md +++ b/docs/tutorials/stateful-application/basic-stateful-set.md @@ -285,6 +285,16 @@ web-0 web-1 ``` +Note, if you instead see 403 Forbidden responses for the above curl command, +you will need to fix the permissions of the directory mounted by the `volumeMounts` +(due to a [bug when using hostPath volumes](https://github.com/kubernetes/kubernetes/issues/2630)) with: + +```shell +for i in 0 1; do kubectl exec web-$i -- chmod 755 /usr/share/nginx/html; done +``` + +before retrying the curl command above. + In one terminal, watch the StatefulSet's Pods. ```shell