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
668 B
37 lines
668 B
2 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: ds-clusterip-pod
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
k8s-app: nginx-app-clusterip
|
||
|
replicas: 2
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s-app: nginx-app-clusterip
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: nginx
|
||
|
image: ranchertest/mytestcontainer
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s-app: nginx-app-clusterip
|
||
|
name: ds-clusterip-svc
|
||
|
namespace: default
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
ipFamilyPolicy: PreferDualStack
|
||
|
ports:
|
||
|
- protocol: TCP
|
||
|
port: 80
|
||
|
targetPort: 80
|
||
|
selector:
|
||
|
k8s-app: nginx-app-clusterip
|