text
stringlengths
0
59.1k
1. Attach the specified volume to the kubelet's host machine
2. Format the volume if required (only if the volume specified is not already formatted to the fstype specified)
3. Mount it on the kubelet's host machine
4. Spin up a container with this volume mounted to the path specified in the pod definition
<|endoftext|>
# source: k8s_examples/nginx-platform-app/service.yml type: yaml
apiVersion: v1
kind: Service
metadata:
name: nginx-platform-service
spec:
type: ClusterIP
selector:
app: nginx-platform-app
ports:
- protocol: TCP
port: 80
targetPort: 80
<|endoftext|>
# source: k8s_examples/nginx-platform-app/deployment.yml type: yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-platform-app
labels:
app: nginx-platform-app
spec:
replicas: 2
selector:
matchLabels:
app: nginx-platform-app
template:
metadata:
labels:
app: nginx-platform-app
spec:
containers:
- name: nginx
image: nginx:stable
ports:
- containerPort: 80
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "300m"
memory: "256Mi"
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 15
periodSeconds: 20
<|endoftext|>
# source: k8s_examples/nginx-platform-app/README.md type: docs
# Nginx Platform Application Example
This example demonstrates a production-style Kubernetes deployment using Nginx with:
- Resource requests and limits
- Readiness and liveness probes
- Service exposure using ClusterIP
- Clean label/selector architecture
- Separation of concerns (deployment + service)
## Files
- `deployment.yaml` – Application deployment configuration
- `service.yaml` – Internal service exposure
## How to deploy
```bash
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
<|endoftext|>
# source: k8s_examples/web/guestbook/frontend-service.yaml type: yaml
apiVersion: v1
kind: Service
metadata:
name: frontend
labels:
app: guestbook
tier: frontend
spec:
# comment or delete the following line if you want to use a LoadBalancer