Hello
I am using Ubuntu in Virtualbox and I bridge the internet in the virtualbox.
I can access the dashboard and everything after install however somehow for me the node ports don’t work. I disabled the firewall just for testing because I thought it was the problem but it seems not helped anything.
Deployment yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "2"
field.cattle.io/publicEndpoints: '[{"port":31117,"protocol":"TCP","serviceName":"default:helloworld-nodeport","allNodes":true}]'
objectset.rio.cattle.io/applied: H4sIAAAAAAAA/4RRTYvbPBD+L3O2E8V2Nl7dXvJCLwsxpbSHspSxNK7VypKQJgkh6L8XZdNQCm1PtmaeLz26AgbzkWIy3oEEDCGtTxuo4LtxGiT8T8H6y0KOoYKFGDUygrwCOucZ2XiXytGP30hxIl5F41cKmS2tjF+bIjJt1BZxorqh9rnuhNY1imasVa+3O6GmdpqeIVdgcST7V7kZ0wwSOuyacXrqhN71YrvT7bjrNE7NU6P7VuzaFptxi5uuiDpcCCTMZK2vzz5aDW/DFFCVjaYJj5YLNgVSxT5SsEZhArkVFSSypNjHslmQ1fzyyIkh/KadcwVMS7DIdCP80pn9B++nvfKO0TiKCeTnK5A73b73m+wPn77sDy+H91DBCe2xzMIxBkuQXyswC34toxHT7KcFnVtHdGqmWGtavNysxErAHTccrR28NeoCEv6zZ7wk+ENlwUd+y/OIN/jIIHvRiwfnTGPBRs9eeQsSPuyHW6xIqI2jlIbox1szM3N4R1x+A3J51vXd5q6Tc37NOecfAQAA//8WWEi0pAIAAA
objectset.rio.cattle.io/id: f1c5aafe-2e39-40dd-a02b-c8d570cf3ff9
creationTimestamp: "2022-06-11T21:34:41Z"
generation: 3
labels:
objectset.rio.cattle.io/hash: 4a42bf640d78057d3b74daf262d830733a2b5a14
managedFields:
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:field.cattle.io/publicEndpoints: {}
f:objectset.rio.cattle.io/applied: {}
f:objectset.rio.cattle.io/id: {}
f:labels:
.: {}
f:objectset.rio.cattle.io/hash: {}
f:spec:
f:progressDeadlineSeconds: {}
f:replicas: {}
f:revisionHistoryLimit: {}
f:selector: {}
f:strategy:
f:rollingUpdate:
.: {}
f:maxSurge: {}
f:maxUnavailable: {}
f:type: {}
f:template:
f:metadata:
f:annotations:
.: {}
f:cattle.io/timestamp: {}
f:labels:
.: {}
f:app: {}
f:spec:
f:containers:
k:{"name":"hello-world"}:
.: {}
f:env:
.: {}
k:{"name":"COW_COLOR"}:
.: {}
f:name: {}
f:value: {}
f:image: {}
f:imagePullPolicy: {}
f:name: {}
f:ports:
.: {}
k:{"containerPort":8080,"protocol":"TCP"}:
.: {}
f:containerPort: {}
f:name: {}
f:protocol: {}
f:readinessProbe:
.: {}
f:failureThreshold: {}
f:httpGet:
.: {}
f:path: {}
f:port: {}
f:scheme: {}
f:periodSeconds: {}
f:successThreshold: {}
f:timeoutSeconds: {}
f:resources: {}
f:terminationMessagePath: {}
f:terminationMessagePolicy: {}
f:dnsPolicy: {}
f:restartPolicy: {}
f:schedulerName: {}
f:securityContext: {}
f:terminationGracePeriodSeconds: {}
manager: rancher
operation: Update
time: "2022-06-11T21:39:23Z"
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
f:deployment.kubernetes.io/revision: {}
f:status:
f:availableReplicas: {}
f:conditions:
.: {}
k:{"type":"Available"}:
.: {}
f:lastTransitionTime: {}
f:lastUpdateTime: {}
f:message: {}
f:reason: {}
f:status: {}
f:type: {}
k:{"type":"Progressing"}:
.: {}
f:lastTransitionTime: {}
f:lastUpdateTime: {}
f:message: {}
f:reason: {}
f:status: {}
f:type: {}
f:observedGeneration: {}
f:readyReplicas: {}
f:replicas: {}
f:updatedReplicas: {}
manager: k3s
operation: Update
subresource: status
time: "2022-06-11T21:44:21Z"
name: hello-world
namespace: default
resourceVersion: "61296"
uid: 27c4d194-43d6-4903-965d-e88dce8fdcee
spec:
progressDeadlineSeconds: 600
replicas: 50
revisionHistoryLimit: 10
selector:
matchLabels:
app: hello-world
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
cattle.io/timestamp: "2022-06-11T21:39:23Z"
creationTimestamp: null
labels:
app: hello-world
spec:
containers:
- env:
- name: COW_COLOR
value: purple
image: bashofmann/rancher-demo:1.0.0
imagePullPolicy: Always
name: hello-world
ports:
- containerPort: 8080
name: web
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: web
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status:
availableReplicas: 50
conditions:
- lastTransitionTime: "2022-06-11T21:43:17Z"
lastUpdateTime: "2022-06-11T21:43:17Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2022-06-11T21:34:41Z"
lastUpdateTime: "2022-06-11T21:44:21Z"
message: ReplicaSet "hello-world-6568f948f4" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 3
readyReplicas: 50
replicas: 50
updatedReplicas: 50
Service - Node Port yaml:
apiVersion: v1
kind: Service
metadata:
annotations:
field.cattle.io/publicEndpoints: '[{"port":31117,"protocol":"TCP","serviceName":"default:helloworld-nodeport","allNodes":true}]'
creationTimestamp: "2022-06-11T21:26:38Z"
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:field.cattle.io/publicEndpoints: {}
f:spec:
f:externalTrafficPolicy: {}
f:internalTrafficPolicy: {}
f:ports:
.: {}
k:{"port":8080,"protocol":"TCP"}:
.: {}
f:nodePort: {}
f:port: {}
f:protocol: {}
f:targetPort: {}
f:selector: {}
f:sessionAffinity: {}
f:type: {}
manager: rancher
operation: Update
time: "2022-06-11T21:26:38Z"
name: helloworld-nodeport
namespace: default
resourceVersion: "50562"
uid: 861ef519-dc6b-4c04-a1c2-2bee7f4b38e4
spec:
clusterIP: 10.43.192.108
clusterIPs:
- 10.43.192.108
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- nodePort: 31117
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: hello-world
sessionAffinity: None
type: NodePort
status:
loadBalancer: {}
Do I missing something? Because I can’t reach that 31117 port.
Thank you in advance the answers.
Update: I forgot to mention whatever port I am giving any of them can’t be accessed.
Plus I forgot to mention within router is the node and the internal IP is given to the rancher which the router gave IP address. Which is for me 192.168.0.1 (gateway)