mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
36 lines
632 B
YAML
36 lines
632 B
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: test-nodeport
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
k8s-app: nginx-app-nodeport
|
||
|
replicas: 2
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s-app: nginx-app-nodeport
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: nginx
|
||
|
image: shylajarancher19/shylajaarm64:v1.0
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s-app: nginx-app-nodeport
|
||
|
name: nginx-nodeport-svc
|
||
|
namespace: default
|
||
|
spec:
|
||
|
type: NodePort
|
||
|
ports:
|
||
|
- port: 80
|
||
|
nodePort: 30096
|
||
|
name: http
|
||
|
selector:
|
||
|
k8s-app: nginx-app-nodeport
|