mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-08 17:10:04 +08:00
k8s: deployment & nodePort service
- nodePort service is merely a proof-of-concept; this won't be the final form the service takes. The port needs to be 53, not 32767. - the deployment doesn't include the nginx webserver, merely the DNS server. Also, I had trouble connecting both UDP & TCP to port 53, so I chose UDP.
This commit is contained in:
22
k8s/sslip.io-deployment.yml
Normal file
22
k8s/sslip.io-deployment.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sslip.io
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: sslip.io-pod
|
||||
labels:
|
||||
app: sslip.io
|
||||
spec:
|
||||
containers:
|
||||
- name: sslip-container
|
||||
image: cunnie/sslip.io
|
||||
ports:
|
||||
- containerPort: 53
|
||||
protocol: TCP
|
||||
- containerPort: 53
|
||||
protocol: UDP
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sslip.io
|
19
k8s/sslip.io-nodeport-service.yml
Normal file
19
k8s/sslip.io-nodeport-service.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
# DON'T USE THIS!
|
||||
#
|
||||
# NodePorts aren't the right solution; this is for personal testing
|
||||
# kubectl create -f nodeport-service.yml
|
||||
# dig -p 32767 127.0.0.1.sslip.io @172.17.0.2
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: sslip-io-nodeport-service # must be DNS-compliant
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- protocol: UDP
|
||||
name: dns-udp
|
||||
port: 53
|
||||
# targetPort: 53
|
||||
nodePort: 32767
|
||||
selector:
|
||||
app: sslip.io
|
Reference in New Issue
Block a user