-
Notifications
You must be signed in to change notification settings - Fork 2
-
Notifications
You must be signed in to change notification settings - Fork 2
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 : how to upgrade a cluster in Azure ACS ? #15
Comments
Right now, you would need to perform the upgrade manually. In the coming months we will be building managed updates in the ACS service. If you wanted to upgrade manually, you'd want to SSH to each node, edit |
Ok great. I will try this. Do you know if there are any plan to add 1.5 to ACS any soon to replace 1.4.6 ? |
We're in progress on it, but are holding off until after New Year, due to deployment "no fly zones" for the holidays. |
Great. I made the update on my master node to 1.5.1, it went flawlessly. I will automate it with a fabric script for the time being. thanks for the support ! |
Hm. After updating the file
|
@AlexGrs Oh my mistake, you basically just upgraded You'll need to make the same 1.4.6->1.5.1 replacement inside the files in |
@AlexGrs .. I just went through a similar upgrade. After the systemd kubelet, |
Just made my cluster work by using the https://github.com/Azure/acs-engine and hacking the version 1.5.1 into the generated template just before deployment. Finally, persistent volumes are working flawlessly. @colemickens Any updates on kubernetes 1.5.1 as default version for deployments via Azure Container Service? |
@phimar I did the same.
Really? I haven't tested in 1.5.1 yet. I'm going to take a look again. Cheers. |
@otaviosoares Yep, it's working. It is as simple as configuring a storage class for azureDisk and a persistent volume claim for your deployment. The vhds are created and mounted to the correct agent automatically. |
@phimar Yep but still there's that problem with Disks over 30gb. |
@colemickens mkfs.ext4 that's taking hours when kubelet try to format a new PersistentVolume. kubernetes/kubernetes#38865 If i want to mount a 500gb PersistentVolume ... it's taking something like 1 hour. |
I'm planning to move our application to kubernetes on azure. Regarding the issue you mentioned @theobolo : does it mean that if I add a 128Go persistent disk, my deployment will forever to finish ? At least the first time ? Do you have a workaround for this? |
Preformat the disk and you'll avoid that issue. There are patches in flight to tweak the flags to mkfs to try to avoid the issue entirely. Also, if you just use the dynamic disk provisioning feature, you won't hit this issue, which is much easier to do than manually creating the VHD anyway. |
@colemickens I'm using the Dynamic Disk Provisionning feature with a PVC and an "Azure" But still if i decide to Claim a 500gb volume it's taking more than 1 hour (i'm actually validating my words by deploying a Mongo StatefulSet with a 500gb volumes per instances using my AzureStorageClass) Not seems that using the k8s Dynamic Provisioning is solving that issue since kube-controller logs when mounting the first instance with the disk :
and the related kubelet logs after 1hour :
And the Kubernetes Dashboard waiting the disk : And the PersistentVolumes : After 1 hour i'm still waiting my 1st Mongo Pod .... I'm missing something ? |
Sorry, @theobolo you're correct, I got wires crossed. I pinged the relevant PR again last night to try to push it along. I'll escalate it in the next two days if it doesn't pick up momentum. |
@colemickens Merci Cole ;) |
When your PR is merged, will it be available in the next Kubernetes Release ? I'll try to hack around acs-engine to deploy the cluster to stay as up-to-date as possible with latest improvements on kubernetes for azure |
It's not my PR, but yes, that's generally how it works. You can always build your own release and deploy it with ACS-Engine. Since ACS-Engine does everything with the hyperkube image, you merely need to build it yourself. My dev cycle is usually:
And then after it's done, I can use |
Hey @colemickens : you mentioned using I tried to find the relevant documentation about it in the documentation and found only this link In this example, the DiskURI is mandatory. But with dynamic claim, it should be automatically created right ? Or am I missing something ? |
There is dynamic disk provisioning just like in GCE or AWS. I think documentation is absent. kubernetes/kubernetes#30091 |
should be available now by kubernetes/website#2039 |
I seem to hit a timeout issue when trying to mount a persistent volume : I checked and a VHD is indeed created in my storage account. I tried to check logs in the controller, and the mount on host seems working. Here are some logs from kube-controller:
|
@AlexGrs do you have kubelet log on that host? |
@rootfs : For the host where the pod is located ? I will check how to ssh on it to check logs. |
@AlexGrs yes, from the host where pod lands. |
@AlexGrs Witch is the size of the PersistentVolume that you wanted to deploy ? Because as i said if you try to provision a Disk bigger than 30gb it can takes a long time before the POD mount it correctly. Even if the kube-controller says that the Volume is mounted that's not mean that it's formatted : that's why the error is still here and why your POD is not available, For exemple if i want to deploy a 30gb disk on a Premium Storage used by a Jenkins POD. The first time it takes something like 15-20min because Kubelet need to do a mkfs.ext4 on that disk before the POD starts. That's why you have that error. Just wait a little bit or try with a smaller disk ;) |
I managed to connect to my agent running this pod. During this time ( nearly 20 minutes), it seems the pod managed to finally mount the disk. I delete the The size of the disk is |
@AlexGrs That's exactly the point :
|
Ah ! That's why. I saw there is a on-going PR for a |
@AlexGrs the only workaround today is as @colemickens said, formatting your Disk manually (you can use his guide https://github.com/colemickens/azure-kubernetes-demo). I did that to format two 500gb disks used by Jenkins and Nexus Repo, when the disks are preformatted, kubelet won't try to format it and will mount disks in 2-3min maximum. That's the only way to use big PersistentDisks on Azure (and to reach the P30 perfs on Premium Storage, since disk perfs are indexed on the disk size in Azure). Last thing, to mount your VHD once is formatted, you can use that :
|
@AlexGrs A workaround/hack is to use this script: https://gist.github.com/codablock/9b8c3a09b6f725436143da575d23ca45 It is a wrapper script around mkfs.ext4 and removes all lazy init related flags from the mkfs.ext4 call. to use it: $ mv /usr/sbin/mkfs.ext4 /usr/sbin/mkfs.ext4.original
$ wget -O /usr/sbin/mkfs.ext4 https://gist.githubusercontent.com/codablock/9b8c3a09b6f725436143da575d23ca45/raw/ed6e604ec71c2230e889b625b85d2986d0e6eb18/mkfs.ext4%2520lazy%2520init%2520hack
$ chmod +x /usr/sbin/mkfs.ext4 I deploy this with Ansible (kargo) right now. It assumes that the hosts mkfs.ext4 is used. I'm not sure how acs-engine deploys kubelet, but I'd expect it to be deployed as regular service and not as containarized kubelet. If this is not the case, the script would have to be put into the hyperkube image (making things complicated). |
@codablock unfortunately |
@theobolo : I think you did not finish your answer ;) @codablock : kubelet is running in a container with ACS engine |
Is kubelet run with nsenter on acs-engine? |
Just seen the screenshot from theobolo and it looks like it is not run with nsenter. This would mean that you'd somehow must modify the hyperkube image to make the wrapper work. If acs-engine supports specifying a custom hyperkube image, that could be done by extending from the original image, installing the script in it, pushing it to docker hub and then use the custom/modified image. |
@codablock That's possible to use a custom Hyperkube image, seems heavy but it should works ... |
It seems it's the approach @colemickens described in his previous post. |
@AlexGrs What he describes is a complete rebuild of kubernetes. This would only be required if you would like to do the changes directly in the k8s source tree or if you would like to build and use current master. EDIT: If you want to do this, then it's better to create a branch based on 1.5.2 and merge in kubernetes/kubernetes#38865 instead of using this hack |
@codablock : I will maybe try this waiting for your PR to be merge in master branch. I tried with a
|
@AlexGrs The PR is merged now. I would however wait for kubernetes/kubernetes#40066 to be merged as well. |
I created Kubernetes cluster using Azure portal and it installed 1.5.3 by default. There is no way to upgrade the cluster easily. In order to have up-to-date Kubernetes clusters, we need this feature. |
Upgrading in Azure from 1.5.3 to 1.5.7 is simple, Anybody here that have successfully upgraded from 1.5.X to 1.6.X in Azure. I have a problem with the master not starting the kubelet.service correctly if I try this approach. It seems that the
As it seems that the kubelet is started as a Docker container |
Now that the recommended way of deploying a cluster is by using ACS, is there a recommended way to upgrade an existing kubernetes cluster ?
Right now, all the cluster I deployed were in 1.4.6 but I would like to benefit from the great work you made with 1.5 in azure.
The text was updated successfully, but these errors were encountered: