polite-engineer-55788
08/10/2022, 5:06 AMcat <<EOF | k3d cluster create -c -
apiVersion: <http://k3d.io/v1alpha4|k3d.io/v1alpha4>
kind: Simple
metadata:
name: my-cluster
servers: 1
agents: 2
image: rancher/v1.24.3-k3s1
ports:
# Drone CI
- port: 127.0.0.1:30980:30980
nodeFilters:
- agent:*
# Gitea
- port: 127.0.0.1:30950:30950
nodeFilters:
- agent:*
# Argo CD
- port: 127.0.0.1:30080:30080
nodeFilters:
- agent:*
registries:
name: "${reg_name}"
host: "0.0.0.0"
hostPort: "${reg_port}"
volumes:
- "${PWD}/.k3s/registry":/var/lib/registry
EOF
melodic-market-42092
08/10/2022, 7:28 AMpolite-engineer-55788
08/10/2022, 2:08 PMfierce-magician-45581
08/11/2022, 12:55 AMk3d
via helm where cluster is created as below -
k3d cluster create --agents 2 test-cluster \
--api-port 6445 \
--port '8585:8585@loadbalancer' \
--port '2376:2376@loadbalancer' \
--port '80:80@loadbalancer' \
--port '443:443@loadbalancer'
My app is using ports 80,443,2376 and 8585. All pods are up and running fine but when I am trying to access my application, on 80/443 I am getting a 404 not found
error from traefik
, I can not change application port from 80/443 to some other port as there are some internal micro-services dependency.
Can you help me to understand what might be wrong here?polite-engineer-55788
08/12/2022, 3:37 PMTRAEFIK_LB_IP:<port>
from the host ?polite-engineer-55788
08/13/2022, 2:45 AMregistries:
mirrors:
"<http://docker.io|docker.io>":
endpoint:
- "<https://registry-1.docker.io>"
"<http://quay.io|quay.io>":
endpoint:
- "<https://quay.io>"
create:
name: "k3d-myregistry.localhost"
host: "0.0.0.0"
hostPort: "5001"
volumes:
- "<localpath>/.k3s/registry:/var/lib/registry"
and then in all my references I use k3d-myregistry.localhost:5000
polite-engineer-55788
08/16/2022, 12:21 PMinsecure
registry with k3d using registry k8s service on my clusterred-queen-31013
08/17/2022, 8:36 AMno route to host
). Security Groups are ok, cuz if I delete iptable rules, its working correctly,....high-morning-12231
08/17/2022, 9:44 PMdazzling-zoo-91458
08/18/2022, 7:32 AMk3d registry create registry.localhost --port 12345
k3d cluster create mycluster --registry-use k3d-registry.localhost:12345
docker pull nginx:latest
docker tag nginx:latest k3d-registry.localhost:12345/nginx:latest
docker push k3d-registry.localhost:12345/nginx:latest
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-test-registry
labels:
app: nginx-test-registry
spec:
replicas: 1
selector:
matchLabels:
app: nginx-test-registry
template:
metadata:
labels:
app: nginx-test-registry
spec:
containers:
- name: nginx-test-registry
image: k3d-registry.localhost:12345/nginx:latest
ports:
- containerPort: 80
EOF
No errors so far, but when I run kubectl describe pod nginx-test-registry
the event log looks like:
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 13s default-scheduler Successfully assigned default/nginx-test-registry-5ff799bb8f-6mk6z to k3d-mycluster-server-0
Warning FailedCreatePodSandBox 3s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox image "rancher/mirrored-pause:3.6":
failed to pull image "rancher/mirrored-pause:3.6": failed to pull and unpack image "<http://docker.io/rancher/mirrored-pause:3.6|docker.io/rancher/mirrored-pause:3.6>":
failed to resolve reference "<http://docker.io/rancher/mirrored-pause:3.6|docker.io/rancher/mirrored-pause:3.6>":
failed to do request: Head "<https://registry-1.docker.io/v2/rancher/mirrored-pause/manifests/3.6>": dial tcp: lookup <http://registry-1.docker.io|registry-1.docker.io> on 127.0.0.11:53: read udp 127.0.0.1:34330->127.0.0.11:53: i/o timeout
I reckon that there is a problem with my network config on my host machine but I'm not sure and don't know where to start looking.
Any ideas of what my problem is and how to fix it?polite-engineer-55788
08/19/2022, 3:09 AMpolite-engineer-55788
08/19/2022, 3:12 AMbrash-businessperson-80975
08/19/2022, 11:06 PMflat-glass-90449
08/20/2022, 1:04 PMmillions-alarm-86298
08/22/2022, 8:29 AMpolite-engineer-55788
08/22/2022, 5:08 PMmelodic-market-42092
08/23/2022, 6:36 AMkubectl logs ...
, sometimes I get output from that, but mostly I don't. Have anyone experienced anything similar?clever-pizza-61378
08/25/2022, 1:49 AMpolite-engineer-55788
08/25/2022, 8:32 AMwide-garage-9465
08/29/2022, 10:52 AMfancy-angle-74076
08/31/2022, 5:11 PMk3d cluster create --config=blah.yaml
behave this way (or k3d cluster start
fancy-angle-74076
08/31/2022, 5:28 PMquick-midnight-5000
08/31/2022, 8:36 PMdev.local
) and I've previously made this work by adding a HOSTS entry to map to an always-consistent IP (192.168.64.200
) and then having MetalLB + Traefik's Ingress LB mapped to that IP specifically on port 80.
In my head that means I should be able to: k3d cluster create foo-cloud --no-lb --k3s-arg="--disable=traefik@server:0" -p "192.168.64.200:80:80"
but k3d doesn't seem to agree:
FATA[0000] failed to transform ports: No nodefilters specified
Is there a more appropriate way to accomplish this?fancy-angle-74076
09/06/2022, 5:48 PMfancy-angle-74076
09/06/2022, 5:57 PMmelodic-market-42092
09/08/2022, 9:39 AMbreezy-electrician-44168
09/14/2022, 8:35 PMk3d-dev-server-0
node.
k3d cluster create dev --agents 2 --servers 1
kubectl get no
NAME STATUS ROLES AGE VERSION
k3d-dev-agent-0 Ready <none> 2m13s v1.24.4+k3s1
k3d-dev-agent-1 Ready <none> 2m13s v1.24.4+k3s1
k3d-dev-server-0 Ready control-plane,master 2m18s v1.24.4+k3s1
kubectl create deploy web --image=nginx:alpine --replicas=3
kubectl get po -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
web-654c99587f-h9hr5 1/1 Running 0 27s 10.42.0.5 k3d-dev-server-0 <none> <none>
web-654c99587f-xwkjg 1/1 Running 0 27s 10.42.1.5 k3d-dev-agent-0 <none> <none>
web-654c99587f-4z45l 1/1 Running 0 27s 10.42.2.5 k3d-dev-agent-1 <none> <none>
purple-dream-76106
09/16/2022, 2:46 PMapiVersion: <http://k3d.io/v1alpha4|k3d.io/v1alpha4>
kind: Simple
metadata:
name: test
servers: 1
agents: 2
kubeAPI:
host: localhost
hostIP: 0.0.0.0
hostPort: "6443"
volumes:
- volume: /tmp:/tmp/host
nodeFilters:
- all
ports:
- port: 0.0.0.0:8080:80
nodeFilters:
- loadbalancer
- port: 0.0.0.0:8443:443
nodeFilters:
- loadbalancer
options:
k3d:
wait: true
timeout: "150s"
disableImageVolume: false
disableLoadbalancer: false
disableRollback: false
k3s:
extraArgs:
- arg: --tls-san=127.0.0.1
nodeFilters:
- server:*
kubeconfig:
updateDefaultKubeconfig: true
switchCurrentContext: true
I have installed Neuvector with helm
NAMESPACE="neuvector"
helm upgrade neuvector neuvector/core -n ${NAMESPACE} \
--install \
--create-namespace \
--set k3s.enabled=true \
--set manager.svc.type="ClusterIP"
It is up and running, but I am not able to get the UI of the management pod. Not with a port forward and not on the service. Any help would be appreciated. Thanks!gorgeous-battery-45190
09/24/2022, 7:29 PM