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

Question about the secrect of Azure Storage Account? #1

Open
fengli858 opened this issue Nov 19, 2017 · 8 comments
Open

Question about the secrect of Azure Storage Account? #1

fengli858 opened this issue Nov 19, 2017 · 8 comments

Comments

@fengli858
Copy link

Could you explain how to use azure-secret.yaml (azure storage secret) in your process? I do not see how the azure-secret to be used? Thanks!

@andyzhangx
Copy link
Owner

@fengli858
Copy link
Author

@andyzhangx My Linux Pods are able to connect to my azure file share. My real problem is my Windows Pods are not able to connect to the existing Azure file shares (for both same resource group and different resource group). my k8s hybrid cluster (0.8.0) kubernetes 1.8.0.
the windows test pod yaml file is (static).
Thank you for your help!
apiVersion: v1
kind: Pod
metadata:
name: iis-azfile01
spec:
nodeSelector:
beta.kubernetes.io/os: windows
containers:

  • image: microsoft/iis:latest
    name: iis-azfile01
    volumeMounts:
    • name: azureiis
      mountPath: '/mnt/azure'
      volumes:
    • name: azureiis
      azureFile:
      secretName: azure-secret
      shareName: k8stest02
      readOnly: false

@fengli858
Copy link
Author

@andyzhangx I also follow you example of Windows Pods dynamic binding to azure files shares on k8s 1.8.0 (acs-engine 0.8.0). The file mount within the Windows Pods did not work. (The dynamic file share was created in storage account, but the pods cannot write file to it.)

@andyzhangx
Copy link
Owner

@fengli858 sorry I should update the azure file example doc earlier: azure file mount feature is only supported on Windows Server version 1709.
For how to set up k8s cluster with windows 1709, you should git pull latest acs-engine, make build, and then go build to get the most updated acs-engine binary and then follow the update example doc here:
https://github.com/andyzhangx/Demo/tree/master/windows/azurefile

Let me know if you have any other issue, thx.

@fengli858
Copy link
Author

@andyzhangx Youe examples are very helpful! I am updating my systems to 1709 to try the Microsoft new docker images 1709. Thanks!

@fengli858
Copy link
Author

@andyzhangx The problem of Kubernetes mount volume within Pod on Azure File Shares has been resolved after using new Microsoft Windows Container base image 1709 (for Windows Server 1709)!
Steps to resolve the issue: (Static binding to storage account at different resource group)

  1. Rebuild Docker image using the Microsoft Windows Container Images tagged with 1709. (microsoft/aspnet: 3.5-windowsservercore-1709)
  2. Create Kubernetes cluster on Azure using acs-engine 0.9.4 (github.com). The cluster has 2 Window’s work agent with Windows Server 1709.
  3. Deploy the Docker images to cluster (with Azure File volume mount and storage access secrets) (see below yaml file)
  4. My website custom log files appear on Azure File Shares (Azure storage account).
    Thank you for your hints!

@fengli858
Copy link
Author

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: azurefile1709
spec:
replicas: 1
template:
metadata:
labels:
app: azurefile1709
spec:
nodeSelector:
beta.kubernetes.io/os: windows
containers:
- image: microsoft/aspnet:3.5-windowsservercore-1709
name: azurefile1709
ports:
- containerPort: 80
volumeMounts:
- name: azure
mountPath: '/mnt/azure'
volumes:
- name: azure
azureFile:
secretName: azure-secret
shareName: agilek8stest
readOnly: false

@fengli858
Copy link
Author

@andyzhangx (1) For acs-engine 0.9.3 cluster (kubernetes 1.8.2), I got lots of error message when I deployed the Pods (such as Sync Pods Error, Cannot create sandbox ...) (2) When I switch to acs-engine 0.9.4 (kubenetes 1.8.2), the cluster works fine so far. (only 2 days -:))
Thanks!

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