Looks like you're stuck. Need a hand?

Share This Tutorial

Views 107

Kubernetes v1.32 “Penelope”

Date  |  Category Programming
...
...
Back Back
Learning Paths Learning Paths

Table of Contents

Overview of Kubernetes v1.32

Kubernetes v1.32 continues the tradition of improving scalability, security, and usability. This release introduces significant enhancements in resource management, security, and node reliability.

Key Enhancements

Custom-Resource Field Selectors (GA)

You can now filter Custom Resource Definitions (CRDs) using field selectors, similar to how you filter built-in resources. This feature allows for more precise querying of CRDs.

Example:

apiVersion: v1
kind: List
metadata:
  resourceVersion: ""
items:
- apiVersion: example.com/v1
  kind: MyCustomResource
  metadata:
    name: example
  spec:
    state: running

PVC Auto-Remove for StatefulSets (GA)

StatefulSets now automatically remove Persistent Volume Claims (PVCs) when they are deleted. This eliminates orphaned volumes and reduces resource leaks.

Example:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: my-statefulset
spec:
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-container
        image: my-image
        volumeMounts:
        - name: my-pvc
          mountPath: /data
  volumeClaimTemplates:
  - metadata:
      name: my-pvc
    spec:
      accessModes: ["ReadWriteOnce"]
      resources:
        requests:
          storage: 1Gi

Job ManagedBy Field (Beta)

The managedBy field allows external schedulers (e.g., Kueue) to cleanly own and manage Jobs. This enhances integration with external systems.

Example:

apiVersion: batch/v1
kind: Job
metadata:
  name: my-job
  labels:
    app: my-app
spec:
  template:
    spec:
      containers:
      - name: my-container
        image: my-image
  managedBy:
    name: my-external-scheduler

Anonymous-Auth Lockdown (Beta)

This feature restricts anonymous authentication to only the /healthz endpoint. It enhances cluster security by reducing unauthorized access.

Example Configuration:

apiServer:
  anonymous:
    enabled: true
    groups: ["system:authenticated"]

Dynamic Resource Allocation (Alpha)

Dynamic Resource Allocation allows for more flexible management of GPU and FPGA resources. It introduces structured parameters for resource allocation.

Example:

apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - name: my-container
    image: my-image
    resources:
      requests:
        example.com/gpu: 1
      limits:
        example.com/gpu: 1

Node Quality of Life (QOL) Improvements

Systemd Watchdog

Kubelet now includes a systemd watchdog that safely restarts the kubelet if it becomes unresponsive. This improves node reliability.

MemoryManager GA

The MemoryManager feature is now generally available. It provides better memory management and isolation for workloads.

CPU Manager Policy

A new CPU manager policy allows for strict CPU reservations, enhancing resource allocation and utilization.

Upgrade Process

14-Week Release Cycle

Kubernetes now follows a 14-week release cycle, allowing for more frequent and stable updates.

Upgrading with kubeadm

To upgrade your cluster to v1.32, use the following command:

kubeadm upgrade apply v1.32.0

Checking Deprecations

Review the deprecation list before upgrading. Notably, the old Dynamic Resource Allocation (DRA) API has been removed. Ensure your manifests are compatible with the new API.

Upgrade Steps

  1. Drain Nodes:

    bash kubectl drain <node-name> --ignore-daemonsets 2. Backup Configurations: Always backup your cluster's configurations before upgrading. 3. Apply Upgrade:

    bash kubeadm upgrade apply v1.32.0 4. Verify Upgrade:

    bash kubectl get nodes -o wide

Release Assets

The release assets for Kubernetes v1.32 are available on GitHub:

https://github.com/kubernetes/kubernetes/releases/tag/v1.32.0

You can find binaries, Docker images, and documentation in the release package.

Conclusion

Kubernetes v1.32 "Penelope" introduces significant improvements in resource management, security, and node reliability. This tutorial provided a comprehensive overview of the key features and steps to get started with the new release. Explore these enhancements to take full advantage of the improved capabilities in Kubernetes v1.32.