-
Notifications
You must be signed in to change notification settings - Fork 29
Kubernetes Objects
Syed Sayem edited this page Apr 1, 2019
·
8 revisions
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
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