Skip to content

Kubernetes Objects

Syed Sayem edited this page Apr 1, 2019 · 8 revisions

Table of contents

top  

Pods

top  

Services

In Kubernetes, there are three general approaches to exposing your application.

  • Using a Kubernetes service of type NodePort, which exposes the application on a port across each of your nodes
  • Use a Kubernetes service of type LoadBalancer, which creates an external load balancer that points to a Kubernetes service in your cluster
  • Use a Kubernetes Ingress Resource

Read more on Medium

 

ClusterIP

top  

NodePort

top  

LoadBalancer

top  

Ingress

top  

Volumes

apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: k8s.gcr.io/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /test-pd
      name: test-volume
  volumes:
  - name: test-volume
    hostPath:
      # directory location on host
      path: /data
      # this field is optional
      type: Directory

top  

Namespaces

top  

Labels and Selectors

top  

Clone this wiki locally