Skip to content

Instantly share code, notes, and snippets.

@orange723
Created December 13, 2025 14:23
Show Gist options
  • Select an option

  • Save orange723/9894df772660d33a6ef9e2b0d03acc44 to your computer and use it in GitHub Desktop.

Select an option

Save orange723/9894df772660d33a6ef9e2b0d03acc44 to your computer and use it in GitHub Desktop.
nginx
kind: Deployment
metadata:
name: web
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: docker.1ms.run/nginx:stable
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
name: web
---
kind: Service
metadata:
name: nginx
namespace: default
labels:
app: nginx
spec:
type: NodePort
ports:
- port: 80
nodePort: 31532
selector:
app: nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment