Lightweight Kubernetes
 
 
 
 
Go to file
Kubernetes Submit Queue 17ba22aa85 Merge pull request #52469 from andyzhangx/azurefile-mount-windows
Automatic merge from submit-queue (batch tested with PRs 52469, 52574, 52330, 52689, 52829). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

add feature: azurefile mount on windows node

**What this PR does / why we need it**:
feature: azurefile mount on windows node. I created this new PR, close the original one(https://github.com/kubernetes/kubernetes/pull/50233) as there is a big rebase change.
Currently only SMB(a nfs protocol) is supported for windows container in the new Windows 2016 RS3 image, and windows container in RS3 could only use New-SmbGlobalMapping cmdlet for volume mapping, "net use" command does not work for windows container.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
As there is a known blocking issue in Windows 2016 server when mounting a SMB(a NFS protocol in Windows) share on a container host and then bind that share to a container ( Azure file on Windows is using SMB protocol), this PR still could not mount an azure file on current windows 2016 server node, it depends on 2016 RS3 release, and it will still succeed (as a workaround) if customer want to mount an azure file on current windows node.


Main code logic is similar to what it does in Linux node:

1. create target directory in Windows host
2. Use New-SmbGlobalMapping powershell cmdlet to mount SMB azure file to a drive in Windows host
3. Use mklink command to link target directory to the mounted drive

K8s would bind target directory to the container directory
source in mount function would be like:
`\\[accountname].file.core.windows.net\test`

target in mount function would be like:
`c:\var\lib\kubelet\pods\5f679f75-7ce3-11e7-b718-000d3a31dac4\volumes\kubernetes.io~azure-file`

sample azure file config file:
```
apiVersion: v1
kind: Pod
metadata:
 name: iis
spec:
 containers:
  - image: microsoft/iis
    name: iis
    volumeMounts:
      - name: azure
        mountPath: "d:"
 nodeSelector:
   beta.kubernetes.io/os: windows
 volumes:
      - name: azure
        azureFile:
          secretName: azure-secret
          shareName: k8stest
          readOnly: false
```

**Release note**:

```release-note
```
2017-09-23 21:52:46 -07:00
.github
Godeps Merge pull request #50396 from bobbypage/stats 2017-09-23 13:40:56 -07:00
api Generated code. 2017-09-20 00:15:24 -04:00
build Merge pull request #52443 from spxtr/racercar 2017-09-23 18:48:52 -07:00
cluster Merge pull request #52537 from juju-solutions/feature/s390x 2017-09-23 15:26:54 -07:00
cmd Merge pull request #52406 from wackxu/rminithea 2017-09-23 20:55:46 -07:00
docs Generated code. 2017-09-20 00:15:24 -04:00
examples Merge pull request #51929 from ConnorDoyle/cpu-manager-examples 2017-09-23 06:16:06 -07:00
federation Merge pull request #51438 from zhangxiaoyu-zidif/refactor-federation-dns-test-sets 2017-09-23 07:55:00 -07:00
hack Merge pull request #52450 from juanvallejo/jvallejo/misc-err-msg-improvements 2017-09-23 18:48:58 -07:00
logo
pkg Merge pull request #52469 from andyzhangx/azurefile-mount-windows 2017-09-23 21:52:46 -07:00
plugin Merge pull request #52137 from aveshagarwal/master-scheduler-resources-consolidation 2017-09-23 19:49:54 -07:00
staging Merge pull request #52443 from spxtr/racercar 2017-09-23 18:48:52 -07:00
test Merge pull request #52697 from mkumatag/nonewprivs 2017-09-23 19:49:57 -07:00
third_party Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
translations Merge pull request #51463 from lucab85/i18n-Italian 2017-09-23 04:02:51 -07:00
vendor Merge pull request #50396 from bobbypage/stats 2017-09-23 13:40:56 -07:00
.bazelrc
.generated_files
.gitattributes
.gitignore make clean will remove all gitignored files 2017-09-04 11:04:09 -07:00
.kazelcfg.json
BUILD.bazel
CHANGELOG-1.2.md Update TOC of CHANGELOG 2017-09-09 13:38:29 +08:00
CHANGELOG-1.3.md Move 1.3.* release notes out of CHANGELOG.md 2017-09-15 11:21:25 +08:00
CHANGELOG-1.4.md Move 1.4.* release notes out of CHANGELOG.md 2017-09-19 20:22:07 +08:00
CHANGELOG-1.5.md Move 1.5.* release notes out of CHANGELOG.md 2017-09-19 20:22:07 +08:00
CHANGELOG-1.6.md fix some error link of changelog.md and changelog-1.6.md 2017-09-22 15:41:20 +08:00
CHANGELOG.md Merge pull request #52895 from jianglingxia/jlx-proposals 2017-09-22 20:09:35 -07:00
CONTRIBUTING.md
LICENSE
Makefile
Makefile.generated_files
OWNERS Fix my incorrect username in #46649 2017-08-10 11:59:54 -07:00
OWNERS_ALIASES Merge pull request #52108 from cmluciano/cml/addcmlucianomilestone 2017-09-23 07:14:00 -07:00
README.md Add CII Best Practices Badge 2017-08-22 10:56:16 -05:00
SUPPORT.md Add a SUPPORT.md file for github 2017-08-11 14:42:36 -04:00
Vagrantfile
WORKSPACE
code-of-conduct.md
labels.yaml Merge pull request #51848 from xiangpengzhao/milestone-label 2017-09-05 15:46:19 -07:00

README.md

Kubernetes

Submit Queue Widget GoDoc Widget CII Best Practices


Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using Kubernetes

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To start developing Kubernetes

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
$ go get -d k8s.io/kubernetes
$ cd $GOPATH/src/k8s.io/kubernetes
$ make
You have a working Docker environment.
$ git clone https://github.com/kubernetes/kubernetes
$ cd kubernetes
$ make quick-release

If you are less impatient, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Analytics