Open cmoulliard opened 4 years ago
FYI, the following scenario is working on my macbook using docker client
# Create a kind cluster and expose extra port for docker -> 31500
kind delete cluster --name demo
cat <<EOF | kind create cluster --name demo --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 31500
hostPort: 31500
protocol: TCP
listenAddress: "127.0.0.1"
EOF
# Deploy the demo application
kc create ns demo
cat <<EOF | kc apply -n demo -f -
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: quay.io/kameshsampath/quarked:1.0.0
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 8080
EOF
kc expose deployment myapp -n demo --port=8080 --target-port=8080 --type=NodePort
kc patch service myapp -n demo --type='json' --patch='[{"op": "replace", "path": "/spec/ports/0/nodePort", "value":31500}]'
# Access the quarkus application
http :31500
Issue
The example application deployed on kubernetes - 1.18 cannot be accessed using the docker - socat container exposing the port
30939