runtime
runtime copied to clipboard
Ingress: acorn and kind based cluster
Hi, I am trying to deploy a simple dotnet core app using a local k8s kind cluster with acorn, everything builds fine but the endpoint stays in
$ acorn apps
NAME IMAGE HEALTHY UP-TO-DATE CREATED ENDPOINTS MESSAGE
broken-dream c3437fa0c5e0 1 1 79s ago http://<pending> => web:5000 OK
$ kubectl get all -A
NAMESPACE NAME READY STATUS RESTARTS AGE
acorn-system pod/acorn-api-d4b88757b-ncwlp 1/1 Running 0 107m
acorn-system pod/acorn-controller-84b6ddd75-8blxl 1/1 Running 0 107m
acorn-system pod/buildkitd-56d855bc65-qq46h 2/2 Running 0 106m
broken-dream-e308e2c2-04d pod/web-98867589f-thqgk 1/1 Running 0 76s
kube-system pod/coredns-64897985d-n6gb6 1/1 Running 0 109m
kube-system pod/coredns-64897985d-zpg5j 1/1 Running 0 109m
kube-system pod/etcd-kind-control-plane 1/1 Running 0 109m
kube-system pod/kindnet-7xw7b 1/1 Running 0 109m
kube-system pod/kube-apiserver-kind-control-plane 1/1 Running 0 109m
kube-system pod/kube-controller-manager-kind-control-plane 1/1 Running 0 109m
kube-system pod/kube-proxy-nm46x 1/1 Running 0 109m
kube-system pod/kube-scheduler-kind-control-plane 1/1 Running 0 109m
local-path-storage pod/local-path-provisioner-5ddd94ff66-74vh2 1/1 Running 0 109m
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
acorn-system service/acorn-api ClusterIP 10.96.163.46 <none> 7443/TCP 107m
acorn-system service/registry NodePort 10.96.11.104 <none> 5000:31659/TCP 106m
autumn-sea-50707c40-b33 service/web ClusterIP 10.96.91.185 <none> 5000/TCP 4m34s
broken-dream-e308e2c2-04d service/web ClusterIP 10.96.171.29 <none> 5000/TCP 76s
default service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 109m
kube-system service/kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 109m
NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
kube-system daemonset.apps/kindnet 1 1 1 1 1 <none> 109m
kube-system daemonset.apps/kube-proxy 1 1 1 1 1 kubernetes.io/os=linux 109m
NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE
acorn-system deployment.apps/acorn-api 1/1 1 1 107m
acorn-system deployment.apps/acorn-controller 1/1 1 1 107m
acorn-system deployment.apps/buildkitd 1/1 1 1 106m
autumn-sea-50707c40-b33 deployment.apps/web 0/0 0 0 4m34s
broken-dream-e308e2c2-04d deployment.apps/web 1/1 1 1 76s
kube-system deployment.apps/coredns 2/2 2 2 109m
local-path-storage deployment.apps/local-path-provisioner 1/1 1 1 109m
NAMESPACE NAME DESIRED CURRENT READY AGE
acorn-system replicaset.apps/acorn-api-d4b88757b 1 1 1 107m
acorn-system replicaset.apps/acorn-controller-84b6ddd75 1 1 1 107m
acorn-system replicaset.apps/buildkitd-56d855bc65 1 1 1 106m
autumn-sea-50707c40-b33 replicaset.apps/web-6cb95cb9ff 0 0 0 4m34s
broken-dream-e308e2c2-04d replicaset.apps/web-98867589f 1 1 1 76s
kube-system replicaset.apps/coredns-64897985d 2 2 2 109m
local-path-storage replicaset.apps/local-path-provisioner-5ddd94ff66 1 1 1 109m
Acorn file:
containers: {
web: {
image: "myregistry.azurecr.io/blazor-auth-mysql"
ports: publish: "5000/http"
}
}
You need to install an ingress controller like specified here: https://kind.sigs.k8s.io/docs/user/ingress/
We've been talking about some better pre-flight checks. Ingress would be one of them. For Docker Desktop, we actually install nginx ingress if its Docker Desktop and theres not ingress installed
I see, probably a simply note in the documents would be fair until it gets more sophisticated.
As of v0.2.0, install will now check and warn if ingress isnt functioning properly
@iwilltry42
Can you please provide cluster.yaml
example config with host port mapping for kind cluster that will work with acorn
I've tried the following and installed Nginx ingress, but acorn install
check step still failed on IngressCapability.
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: acorn-kind-clster
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
- role: worker
@meldafrawi it works exactly with that config, following the default installation steps from the kind docs. Note 1: It took about 40s for NGINX to be ready in my tests Note 2: It requires https://github.com/acorn-io/acorn/pull/672 to be merged which increases the ingress test timeout, which is required for ingress-nginx to succeed here