Skip to main content

One post tagged with "objects"

View All Tags

· 2 min read

Essential building blocks of the complicated system.

Kubernetes Object

Review Kuberenetes Overview

This is the second part of the Kubernetes series. In this part I will try to add more insights into Kubenetes Objects.

Kubernetes Objects

Kubernetes Objects are persistent entities in Kubernetes. All objects have unique names that allows idempotent creation and retrieval. These objects are stored in etcddatabase as a key-value pair. Objects can categorized as the Basic Objects which determines the deployed containerized application's workloads, their associated network and disk resources, and Higher Level Objects which are build upon the basic objects to provide additional functionality and convenience features to manage the workloads. Higher level objects have a long-running service-like lifecycle, except Jobs.

  • Basic Objects: Pod, Service, Volume and Namespace
  • Higher Level Objects: Replication Controllers, Replication Sets, Deployments, Stateful Sets, Daemon Sets Jobs and Cron Jobs

Every Kubernetes Object definition is a YAML file that contains at least the following items:

  • apiVersion: The version of the Kubernetes API that the definition belongs to.
  • kind: The Kubernetes object this file represents. For example, a pod or service.
  • metadata: This contains the name of the object along with any labels that you may wish to apply to it.
  • spec: This contains a specific configuration depending on the kind of object you are creating, such as the container image or the ports on which the container will be accessible from.