Skip to content

Instantly share code, notes, and snippets.

@aojea
Last active July 29, 2024 11:51
Show Gist options
  • Save aojea/38c6ec34141882c0664caafa50db33ad to your computer and use it in GitHub Desktop.
Save aojea/38c6ec34141882c0664caafa50db33ad to your computer and use it in GitHub Desktop.
agnhost https server
apiVersion: apps/v1
kind: Deployment
metadata:
name: https-server
labels:
app: MyHttpsApp
spec:
replicas: 1
selector:
matchLabels:
app: MyHttpsApp
template:
metadata:
labels:
app: MyHttpsApp
spec:
containers:
- name: agnhost
image: registry.k8s.io/e2e-test-images/agnhost:2.48
args:
- netexec
- --http-port=443
- --udp-port=80
- --tls-cert-file=/localhost.crt
- --tls-private-key-file=/localhost.key
ports:
- containerPort: 443
---
apiVersion: v1
kind: Service
metadata:
name: nodeport-service
spec:
type: NodePort
selector:
app: MyHttpsApp
ports:
- protocol: TCP
port: 443
targetPort: 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment