mirror of https://github.com/k3s-io/k3s
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
681 B
37 lines
681 B
3 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: test-loadbalancer
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
k8s-app: nginx-app-loadbalancer
|
||
|
replicas: 2
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s-app: nginx-app-loadbalancer
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: nginx
|
||
2 years ago
|
image: ranchertest/mytestcontainer:unprivileged
|
||
3 years ago
|
ports:
|
||
2 years ago
|
- containerPort: 8080
|
||
3 years ago
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
2 years ago
|
labels:
|
||
|
k8s-app: nginx-app-loadbalancer
|
||
|
name: nginx-loadbalancer-svc
|
||
|
namespace: default
|
||
3 years ago
|
spec:
|
||
2 years ago
|
type: LoadBalancer
|
||
|
ports:
|
||
|
- port: 81
|
||
|
targetPort: 8080
|
||
|
protocol: TCP
|
||
|
name: http
|
||
|
selector:
|
||
|
k8s-app: nginx-app-loadbalancer
|