What Is New in Kubernetes 1.4
Kubernetes 1.4 delivers a significant expansion of its core capabilities, focusing on streamlined application deployment, enhanced cluster management, and a more robust security model. This release makes it easier to run stateful workloads and introduces powerful new automation features.
| Category | Key Highlights |
|---|---|
| New Features | StatefulSets (beta), Cluster Federation, Scheduled Jobs (beta), Horizontal Pod Autoscaling for any metric |
| Improvements | Simplified cluster deployment (kubeadm), enhanced UI, expanded node support, improved volume plug-ins |
| Security | Pod Security Policies (beta), AppArmor support, Network policy API |
| Bug Fixes | Numerous fixes across scheduling, networking, and the API server |
How does Kubernetes 1.4 improve running stateful applications?
The headline feature for stateful workloads is the introduction of StatefulSets (beta), formerly known as PetSets. This workload API manages the deployment and scaling of stateful applications, guaranteeing ordering and uniqueness of its pods.
It provides stable, persistent storage and network identifiers. When a pod is rescheduled, its persistent volumes are remounted to it, and its hostname remains the same. This is critical for databases like Cassandra or etcd that require stable network identities.
In practice, this finally gives us a native, first-class way to run and manage complex stateful services alongside stateless ones without relying on complex external tooling.
What new deployment and management tools were added?
Cluster deployment gets a major upgrade with kubeadm, a new tool designed to simplify the process of
setting up a best-practice Kubernetes cluster. It handles the secure bootstrapping of the control plane
components.
For job scheduling, the ScheduledJob resource enters beta. This allows you to define jobs that should run at specific times or intervals, much like a traditional Unix cron job, but within the Kubernetes ecosystem.
The dashboard UI also received a complete overhaul, moving from a simple read-only view to a full-featured management interface where you can create and modify resources directly from the browser.
How is autoscaling more powerful in this release?
Horizontal Pod Autoscaling (HPA) evolved from being solely CPU-based to supporting autoscaling based on any custom metric. This is a game-changer for autoscaling logic.
You can now scale your application based on application-specific metrics like requests per second, queue length, or memory usage from a monitoring system like Heapster. This allows for much more precise and meaningful scaling decisions that directly reflect your application's load.
The API for this uses the same metrics API that the resource usage UI leverages, creating a consistent model for consuming metrics across the platform.
What security enhancements should I be aware of?
Pod Security Policies enter beta, providing a critical security primitive. They allow cluster admins to control the security-sensitive aspects of pod specification, like running privileged containers or using the host network.
AppArmor support is now stable, enabling you to apply application-level security profiles to your pods on supported nodes. Furthermore, the Network Policy API moves to v1, allowing you to define how groups of pods are allowed to communicate with each other and other network endpoints.
These features collectively provide a much stronger and more granular security framework for running multi-tenant workloads or hardening production clusters.
How does Federation work in Kubernetes 1.4?
Cluster Federation capabilities were significantly expanded. You can now federate ReplicaSets, Secrets, and Namespaces, in addition to the existing Services and Ingress.
This means you can deploy an application across multiple clusters and have its secrets and configuration automatically propagated. A federated ReplicaSet will ensure the desired number of pods are running across your federated clusters, providing cross-region deployment and failover.
This lays the groundwork for building truly global, highly available applications on Kubernetes, though it introduces complexity in network routing and data consistency between clusters.
FAQ
What exactly replaced PetSets?
PetSets were renamed to StatefulSets in 1.4. The API and
functionality are essentially the same; it was purely a naming change to better reflect the purpose of the
resource. You'll need to update any existing PetSet manifests to use the new
apiVersion: apps/v1beta1 and kind: StatefulSet.
Is kubeadm production-ready?
In 1.4, kubeadm is still marked as alpha. It's a fantastic tool
for quickly spinning up development, test, or proof-of-concept clusters that follow secure defaults. However,
for critical production environments, you should still rely on more mature and customizable deployment tools
like kops or your provider's managed service until kubeadm stabilizes.
Can I use ScheduledJobs for one-off tasks?
No, ScheduledJobs (now called CronJobs) are
specifically for recurring tasks. For running a single, one-off task, you should use the Job resource. The
ScheduledJob controller creates Job objects based on its defined schedule.
How do I start using custom metrics for HPA?
You need to deploy a monitoring solution like
Heapster that populates the Kubernetes metrics API with your custom application metrics. Once the metrics are
available in the API, you can define an HPA that references them using the targetAverageValue or
targetValue fields in its spec.
What's the main benefit of Pod Security Policies?
They shift security from an advisory model
to an enforced one. Instead of hoping developers don't create privileged pods, you can use a PSP to have the API
server outright reject any pod that doesn't meet your security standards. This is a fundamental step towards a
multi-tenant or compliance-driven environment.