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

How to create a NFS volume? #86

Closed
stibi opened this issue Jan 8, 2017 · 3 comments
Closed

How to create a NFS volume? #86

stibi opened this issue Jan 8, 2017 · 3 comments

Comments

@stibi
Copy link

stibi commented Jan 8, 2017

Hello,

I'm creating deployments with a NFS volume like this:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  ...
  labels:
    ...
spec:
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        ...
      spec:
      containers:
      - image: ...
        name: ...
        imagePullPolicy: Always
        env:
        - name: foo
          value: "bar"
        ports:
        - containerPort: 80
          name: foobar
        volumeMounts:
        - mountPath: /var/www/foo
          name: foo-mount
        resources:
          requests:
            memory: "128Mi"
          limits:
            memory: "512Mi"
      volumes:
      - name: foo-mount
        nfs:
          path: /opt/nfs/foo
          server: 10.1.0.123

Is this possible the python kubernetes client? The V1Volume don't specify the needed parameters, like the "nfs" option.

The k8s API definition for V1Volume mention several possible options, including NFS: http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1_volume

There is also the v1.NFSVolumeSource: http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1_nfsvolumesource

If this is not implemented yet, can I help somehow?

@mbohlool
Copy link
Contributor

mbohlool commented Jan 9, 2017

It is a known bug, similar to #85. I've already fixed it in kubernetes main repo (kubernetes/kubernetes#39465) and when we patched 1.5 (very soon), I will update this client.

@stibi
Copy link
Author

stibi commented Jan 9, 2017

ok, I understand, thanks for explanation

@stibi stibi closed this as completed Jan 9, 2017
@mbohlool
Copy link
Contributor

Upgrade your client. it should work now.

yliaog pushed a commit to yliaog/client-python that referenced this issue Jan 8, 2022
fix: read config data with bytes (python3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants