Kubernetes Deployments

2019-03-03 11:34发布

While working on creating a platform that will do microservice deployments using Kubernetes, we want to take a Dependency on the Kubernetes Deployment Object. However, we saw the documentation http://kubernetes.io/v1.1/docs/user-guide/deployments.html says the following "Note that Deployment objects effectively have API version v1alpha1. Alpha objects may change or even be discontinued in future software releases" I am wondering if we should go about using the Deployment concept to do our deployments, essentially rolling updates or since it could be discontinued or change, should we just reimplement the same concepts ourselves like , creating a rc with new labels, create new pods with different labels then both old rc and new rc, scale down the old rc by slowly removing pods from the old rc and slowly adding new pods into the new rc. What is the plan or proposed changes for Deployment or that concept is going away for a better concept ? Also i am wondering why OpenShift did not use the Deployment object, was it not ready at that time ?

3条回答
叼着烟拽天下
2楼-- · 2019-03-03 12:08

OpenShifts deployment object preceded the upstream Kube object (being feature complete in the March 2015 time frame). Once Kube Deployments support the remaining features in OpenShift deployments, we'll automatically migrate them. Some things OpenShift deployments support that are not upstream yet

  • Automatic deployment when Docker registry tags change
  • Custom deployments (run your own deployment logic in a pod)
  • Deployment hooks - execute "bundle exec rake db:migrate" before or after deploying your app
  • Recreate deployment strategy
  • Ability to pause or "hold" a deployment so it does not automatically run (so admins can choose to deploy).
  • Ability for deployments to "fail" and be recorded (so that end users know that the code they pushed failed to start).

It will take time to add those remaining options.

查看更多
在下西门庆
3楼-- · 2019-03-03 12:24

Deployment is planned to graduate to beta in 1.2 release. See related issue #15313 for the changes to be made. We will also have new kubectl commands for rolling update which uses Deployment, see issue #17168 and the proposal.

查看更多
手持菜刀,她持情操
4楼-- · 2019-03-03 12:31

As of now, the Deployment concept has been moved to "v1beta1". The concept will most probably be continued, because it is a declarative approach (vs. the imperative approach with the older replication controller etc.).

Can't tell anything about OpenShift but on GKE it works for me pretty well!

查看更多
登录 后发表回答