kubernetes-management

Contents

Roadmap info from roadmap website

Configuration Management

Configuration management in Kubernetes (K8s) is the process of defining and managing the configuration of your applications running in a K8s cluster. K8s provides several mechanisms for managing configuration, including ConfigMaps and Secrets, and supports several ways to inject configuration into your applicationโ€™s containers. Configuration management is tightly integrated with other Kubernetes features and is critical for building scalable and reliable applications in Kubernetes.

Resources

Key Differences in Best Practices

  • Security: Secrets require more stringent access controls and encryption than ConfigMaps.
  • Encryption: Secrets should always be encrypted, while ConfigMaps do not offer encryption by default.
  • Version Control: Avoid storing both in version control, but itโ€™s especially critical for Secrets due to their sensitive nature.

Resource Management

Resource management in Kubernetes involves managing CPU, memory, and storage resources to ensure efficient and effective use of resources. Kubernetes provides several features and tools, including resource quotas, limits, node affinity and anti-affinity, horizontal and vertical pod autoscaling, and cluster autoscaling to manage resources effectively. These features help ensure that resources are allocated fairly, resource contention is avoided, and pods have access to the resources they need. By using these features, Kubernetes can efficiently manage resources, leading to better performance, improved reliability, and reduced costs.

Resources

Understanding Kubernetes Object Model and Declarative Management

To grasp how Kubernetes operates, itโ€™s essential to understand two key concepts:

  • Kubernetes Object Model:

    • Each item that Kubernetes manages (such as a pod or service) is represented by an object. Objects reflect both the desired state (how you want the object to behave) and the current state (how the object is actually behaving).
    • Kubernetes objects have two critical components:
      • Object Spec: This defines the desired state of the object (e.g., how many replicas, what containers should be run).
      • Object Status: This reflects the current state as reported by the Kubernetes control plane.
    • Pods are the smallest deployable object in Kubernetes. They represent one or more containers and share the same networking and storage resources.
  • Declarative Management:

    • In Kubernetes, you define the desired state of the objects, and Kubernetes ensures that the system matches that state. This is done through a continuous watch loop, where the Kubernetes control plane monitors and adjusts the system as needed.
    • Kubernetes follows the declarative management approach, meaning you declare the state (through YAML or JSON files), and Kubernetes automatically maintains it
  • Kubernetes Components:

    • Control Plane: Manages the Kubernetes cluster, handling the scheduling and orchestration of pods. Components include:
      • kube-apiserver: The API server, which is the entry point for all administrative tasks.
      • etcd: The key-value store that holds cluster configuration data.
      • kube-scheduler: Decides which node should run a newly created pod.
      • kube-controller-manager: Manages control loops that regulate the systemโ€™s state.
    • Nodes: Worker machines that run the application workloads (pods) and interact with the control plane.
  • Kubernetes Object Management:

    • Kubernetes objects can be managed in several ways:
      • Imperative Commands: These allow you to perform actions immediately via the Kubernetes CLI (e.g., kubectl apply, kubectl delete). This is typically used for quick fixes or testing.
      • Declarative Files: Using YAML/JSON files to describe your workloads and desired states allows for more stable, repeatable, and scalable management of Kubernetes environments.
    • Youโ€™ll use tools like kubectl, the Kubernetes CLI, to interact with your clusters and manage workloads.
#roadmap #Informatic #kubernetes #ready #online