Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statefulsets deployment issue while mounting volume using VolumeClaimTemplate #729

Closed
pankaja-rokkada opened this issue Mar 13, 2018 · 3 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Milestone

Comments

@pankaja-rokkada
Copy link

Is this a request for help?

If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.

If no, delete this section and continue on.

What keywords did you search in kubeadm issues before filing this one?

If you have found any duplicates, you should instead reply there and close this page.

If you have not found any duplicates, delete this section and continue on.

Is this a BUG REPORT or FEATURE REQUEST?

Choose one: BUG REPORT or FEATURE REQUEST

Versions

kubeadm version (use kubeadm version): kubeadm version: &version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-07T11:55:20Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version): Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T20:44:38Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}

  • Cloud provider or hardware configuration:

  • OS (e.g. from /etc/os-release): Ubuntu 16.04.2 LTS

  • Kernel (e.g. uname -a): Linux kubeadm-master-61 4.8.0-46-generic should kubeadm have an assets abstraction? #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Others:

What happened?

Creation of Statefulsets failing due to indefinite wait for volume to be mounted. Persistent Volume Claim created as part of this is indefinitely in Pending State.

What you expected to happen?

Successfully create StatefulSet.

How to reproduce it (as minimally and precisely as possible)?

Here is the yaml snippet I'm trying to create
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: zk
spec:
serviceName: zk-hs
replicas: 1
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: zk
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- zk
topologyKey: "kubernetes.io/hostname"
containers:
- name: kubernetes-zookeeper
imagePullPolicy: Always
image: "gcr.io/google_containers/kubernetes-zookeeper:1.0-3.4.10"
resources:
requests:
memory: "1Gi"
cpu: "0.5"
ports:
- containerPort: 2181
name: client
- containerPort: 2888
name: server
- containerPort: 3888
name: leader-election
command:
- sh
- -c
- "start-zookeeper
--servers=1
--data_dir=/var/lib/zookeeper/data
--data_log_dir=/var/lib/zookeeper/data/log
--conf_dir=/opt/zookeeper/conf
--client_port=2181
--election_port=3888
--server_port=2888
--tick_time=2000
--init_limit=10
--sync_limit=5
--heap=512M
--max_client_cnxns=60
--snap_retain_count=3
--purge_interval=12
--max_session_timeout=40000
--min_session_timeout=4000
--log_level=INFO"
readinessProbe:
exec:
command:
- sh
- -c
- "zookeeper-ready 2181"
initialDelaySeconds: 60
timeoutSeconds: 60
livenessProbe:
exec:
command:
- sh
- -c
- "zookeeper-ready 2181"
initialDelaySeconds: 60
timeoutSeconds: 60
volumeMounts:
- name: datadir
mountPath: /var/lib/zookeeper
securityContext:
runAsUser: 1000
fsGroup: 1000
volumeClaimTemplates:

  • metadata:
    name: datadir
    spec:
    accessModes: [ "ReadWriteOnce" ]
    resources:
    requests:
    storage: 10Gi

Anything else we need to know?

I tried enabling feature gate VolumeScheduling and PersistentLocalVolumes as part of kubeadm init but fails with error as feature not supported while I'm using the latest version of kubeadm.

@timothysc timothysc self-assigned this Apr 5, 2018
@timothysc timothysc added the kind/bug Categorizes issue or PR as related to a bug. label Apr 5, 2018
@timothysc timothysc added this to the v1.11 milestone Apr 5, 2018
@timothysc
Copy link
Member

/assign @detiber @chuckha

@timothysc timothysc added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 5, 2018
@chuckha
Copy link

chuckha commented Apr 6, 2018

@pankaja-rokkada would you be able to provide the complete output of kubectl version? Are you also seeing this problem with kubeadm v1.10?

The feature gates you are talking about exist on the k8s components but not kubeadm (so things like kubelet and the kube-apiserver will have those feature gates). Also of note, both of those feature gates (VolumeScheduling and PersistentLocalVolumes) default to true in k8s v1.10.

@timothysc timothysc added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Apr 13, 2018
@timothysc timothysc removed their assignment Apr 13, 2018
@timothysc
Copy link
Member

Closing due to timeout, please reopen with more data if you are still having an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

4 participants