Kubernetes

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

Kubernetes Objects

More information

Resource categories

The kubernetes objects are grouped by the next hight level types of resources:

  • Workloads
  • Discovery & LB
  • Config & Storage
  • Cluster
  • Metadata

Resource Objects

  • ResourceSpec: Filled by the user. Describes the desired state of system.
  • ResourceStatus: Filled by the server. Reports the current state of the system.
  • Resource ObjectMeta: This is metadatada about the resource, such as its name, type, api veresion, annotations, and labels. May be updated both by the end user and the system.

Workloads

  • Containers: A single application container that you want to run within a pod.
  • CronJob: CronJob represents the configuration of a single cron job.
  • DaemonSet: Represents the configuration of a daemon set.
  • Deployments: for stateless persistent apps (e.g. http servers)
  • Jobs: for run-to-completion apps (e.g. batch jobs)
  • Pod: Collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.
  • ReplicaSet: ReplicaSet ensures that a specified number of pod replicas are running at any given time.
  • ReplicationController: Represents the configuration of a replication controller.
  • StatefulSets: for stateful persistent apps (e.g. databases)

Discovery & Load Balancing

  • Endpoints
  • Ingress
  • Service

Config & Storage

  • ConfigMap
  • Secret
  • PersistentVolumeClaim
  • StorageClass
  • Volume
  • VolumeAttachment

Metadata

  • ControllerRevision
  • CustomResourceDefinition
  • Event
  • LimitRange
  • HorizontalPodAutoscaler

Cluster

Kubernetes Dashboard

To access your kubernetes dashboard just open a proxy typing kubectl proxy and open http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

Security

kubectl

  • kubectl - kubectl is a command line interface for running commands against Kubernetes clusters.
  • cheatsheet

See current events associated with a pod

1
kubectl describe pods

Package Managers

Helm

The package manager for Kubernetes

Helm is the best way to find, share, and use software built for Kubernetes.

Development

  • skaffold - Easy and Repeatable Kubernetes Development
  • kind - Kubernetes-in-Docker - A single node cluster to run your CI tests against thats ready in 30 seconds

Testing k8s

minikube

Run Kubernetes locally

Stop minikube

1
2
systemctl stop localkube
docker rm -f $(docker ps -aq --filter name=k8s)

Comments

⬆︎TOP