Last active
June 4, 2023 02:15
-
-
Save luchillo17/68c7496b0d5b0b9cd791c236f5924ad2 to your computer and use it in GitHub Desktop.
Neo4j Kind WSL2 setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: kubernetes-dashboard | |
namespace: kubernetes-dashboard | |
annotations: | |
nginx.ingress.kubernetes.io/rewrite-target: /$2 | |
nginx.ingress.kubernetes.io/configuration-snippet: | | |
rewrite ^(/kubernetes\-dashboard)$ $1/ redirect; | |
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | |
spec: | |
rules: | |
- http: | |
paths: | |
- pathType: Prefix | |
path: /kubernetes-dashboard(/|$)(.*) | |
backend: | |
service: | |
name: kubernetes-dashboard | |
port: | |
number: 443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# three node (two workers) cluster config with Ingress support https://kind.sigs.k8s.io/docs/user/ingress | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
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 | |
- role: worker | |
- role: worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: metallb.io/v1beta1 | |
kind: IPAddressPool | |
metadata: | |
name: example | |
namespace: metallb-system | |
spec: | |
addresses: | |
- 172.18.255.200-172.18.255.250 | |
--- | |
apiVersion: metallb.io/v1beta1 | |
kind: L2Advertisement | |
metadata: | |
name: empty | |
namespace: metallb-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: neo4j-ingress-http | |
namespace: neo4j | |
annotations: | |
nginx.ingress.kubernetes.io/rewrite-target: /$2 | |
# nginx.ingress.kubernetes.io/configuration-snippet: | | |
# rewrite ^(/neo4j)$ $1/ redirect; | |
spec: | |
rules: | |
- http: | |
paths: | |
- pathType: Prefix | |
path: /neo4j/http(/|$)(.*) | |
backend: | |
service: | |
name: neo4j-db-lb-neo4j | |
port: | |
name: http | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: neo4j-ingress-bolt | |
namespace: neo4j | |
annotations: | |
nginx.ingress.kubernetes.io/use-regex: "true" | |
nginx.ingress.kubernetes.io/rewrite-target: /$2 | |
nginx.ingress.kubernetes.io/configuration-snippet: | | |
rewrite ^(/neo4j.7687)$ $1/ redirect; | |
spec: | |
rules: | |
- http: | |
paths: | |
- pathType: Prefix | |
path: /neo4j.7687(/|$)(.*) | |
backend: | |
service: | |
name: neo4j-db-lb-neo4j | |
port: | |
name: tcp-bolt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ k get all -n ingress-nginx -o wide | |
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES | |
pod/ingress-nginx-admission-create-988st 0/1 Completed 0 16m 10.244.3.11 kind-worker2 <none> <none> | |
pod/ingress-nginx-admission-patch-rzxm5 0/1 Completed 0 16m 10.244.1.6 kind-worker3 <none> <none> | |
pod/ingress-nginx-controller-77bc9d6c86-m2tz5 1/1 Running 0 16m 10.244.0.7 kind-control-plane <none> <none> | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR | |
service/ingress-nginx-controller NodePort 10.96.34.241 <none> 80:32552/TCP,443:31396/TCP,7687:31188/TCP 21m app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx | |
service/ingress-nginx-controller-admission ClusterIP 10.96.93.154 <none> 443/TCP 21m app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx | |
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR | |
deployment.apps/ingress-nginx-controller 1/1 1 1 21m controller registry.k8s.io/ingress-nginx/controller:v1.8.0@sha256:744ae2afd433a395eeb13dc03d3313facba92e96ad71d9feaafc85925493fee3 app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx | |
NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR | |
replicaset.apps/ingress-nginx-controller-77bc9d6c86 1 1 1 16m controller registry.k8s.io/ingress-nginx/controller:v1.8.0@sha256:744ae2afd433a395eeb13dc03d3313facba92e96ad71d9feaafc85925493fee3 app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx,pod-template-hash=77bc9d6c86 | |
replicaset.apps/ingress-nginx-controller-d5967cbf4 0 0 0 21m controller registry.k8s.io/ingress-nginx/controller:v1.8.0@sha256:744ae2afd433a395eeb13dc03d3313facba92e96ad71d9feaafc85925493fee3 app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx,pod-template-hash=d5967cbf4 | |
NAME COMPLETIONS DURATION AGE CONTAINERS IMAGES SELECTOR | |
job.batch/ingress-nginx-admission-create 1/1 4s 16m create registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230407@sha256:543c40fd093964bc9ab509d3e791f9989963021f1e9e4c9c7b6700b02bfb227b controller-uid=71b54867-7a38-4f6d-baec-c41f3e813343 | |
job.batch/ingress-nginx-admission-patch 1/1 5s 16m patch registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230407@sha256:543c40fd093964bc9ab509d3e791f9989963021f1e9e4c9c7b6700b02bfb227b controller-uid=0aab9959-7e11-4704-bc65-aec6bf634287 | |
➜ ~ k describe -n ingress-nginx pod/ingress-nginx-controller-77bc9d6c86-m2tz5 | |
Name: ingress-nginx-controller-77bc9d6c86-m2tz5 | |
Namespace: ingress-nginx | |
Priority: 0 | |
Service Account: ingress-nginx | |
Node: kind-control-plane/172.18.0.5 | |
Start Time: Sat, 03 Jun 2023 00:23:42 -0500 | |
Labels: app.kubernetes.io/component=controller | |
app.kubernetes.io/instance=ingress-nginx | |
app.kubernetes.io/managed-by=Helm | |
app.kubernetes.io/name=ingress-nginx | |
app.kubernetes.io/part-of=ingress-nginx | |
app.kubernetes.io/version=1.8.0 | |
helm.sh/chart=ingress-nginx-4.7.0 | |
pod-template-hash=77bc9d6c86 | |
Annotations: <none> | |
Status: Running | |
IP: 10.244.0.7 | |
IPs: | |
IP: 10.244.0.7 | |
Controlled By: ReplicaSet/ingress-nginx-controller-77bc9d6c86 | |
Containers: | |
controller: | |
Container ID: containerd://0459a6acf33ad557392e144909d1c5c0993161194a7abb308cc939829beabb41 | |
Image: registry.k8s.io/ingress-nginx/controller:v1.8.0@sha256:744ae2afd433a395eeb13dc03d3313facba92e96ad71d9feaafc85925493fee3 | |
Image ID: registry.k8s.io/ingress-nginx/controller@sha256:744ae2afd433a395eeb13dc03d3313facba92e96ad71d9feaafc85925493fee3 | |
Ports: 80/TCP, 443/TCP, 8443/TCP, 7687/TCP | |
Host Ports: 80/TCP, 443/TCP, 0/TCP, 0/TCP | |
Args: | |
/nginx-ingress-controller | |
--election-id=ingress-nginx-leader | |
--controller-class=k8s.io/ingress-nginx | |
--ingress-class=nginx | |
--configmap=$(POD_NAMESPACE)/ingress-nginx-controller | |
--validating-webhook=:8443 | |
--validating-webhook-certificate=/usr/local/certificates/cert | |
--validating-webhook-key=/usr/local/certificates/key | |
--watch-ingress-without-class=true | |
--publish-status-address=localhost | |
State: Running | |
Started: Sat, 03 Jun 2023 00:23:43 -0500 | |
Ready: True | |
Restart Count: 0 | |
Requests: | |
cpu: 100m | |
memory: 90Mi | |
Liveness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=5 | |
Readiness: http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=3 | |
Environment: | |
POD_NAME: ingress-nginx-controller-77bc9d6c86-m2tz5 (v1:metadata.name) | |
POD_NAMESPACE: ingress-nginx (v1:metadata.namespace) | |
LD_PRELOAD: /usr/local/lib/libmimalloc.so | |
Mounts: | |
/usr/local/certificates/ from webhook-cert (ro) | |
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-lxlsq (ro) | |
Conditions: | |
Type Status | |
Initialized True | |
Ready True | |
ContainersReady True | |
PodScheduled True | |
Volumes: | |
webhook-cert: | |
Type: Secret (a volume populated by a Secret) | |
SecretName: ingress-nginx-admission | |
Optional: false | |
kube-api-access-lxlsq: | |
Type: Projected (a volume that contains injected data from multiple sources) | |
TokenExpirationSeconds: 3607 | |
ConfigMapName: kube-root-ca.crt | |
ConfigMapOptional: <nil> | |
DownwardAPI: true | |
QoS Class: Burstable | |
Node-Selectors: ingress-ready=true | |
kubernetes.io/os=linux | |
Tolerations: node-role.kubernetes.io/control-plane:NoSchedule | |
node-role.kubernetes.io/master:NoSchedule | |
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s | |
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s | |
Events: | |
Type Reason Age From Message | |
---- ------ ---- ---- ------- | |
Normal Scheduled 19m default-scheduler Successfully assigned ingress-nginx/ingress-nginx-controller-77bc9d6c86-m2tz5 to kind-control-plane | |
Normal Pulled 19m kubelet Container image "registry.k8s.io/ingress-nginx/controller:v1.8.0@sha256:744ae2afd433a395eeb13dc03d3313facba92e96ad71d9feaafc85925493fee3" already present on machine | |
Normal Created 19m kubelet Created container controller | |
Normal Started 19m kubelet Started container controller | |
Normal RELOAD 18m nginx-ingress-controller NGINX reload triggered due to a change in configuration | |
➜ ~ k describe -n ingress-nginx service/ingress-nginx-controller | |
Name: ingress-nginx-controller | |
Namespace: ingress-nginx | |
Labels: app.kubernetes.io/component=controller | |
app.kubernetes.io/instance=ingress-nginx | |
app.kubernetes.io/managed-by=Helm | |
app.kubernetes.io/name=ingress-nginx | |
app.kubernetes.io/part-of=ingress-nginx | |
app.kubernetes.io/version=1.8.0 | |
helm.sh/chart=ingress-nginx-4.7.0 | |
Annotations: meta.helm.sh/release-name: ingress-nginx | |
meta.helm.sh/release-namespace: ingress-nginx | |
Selector: app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx | |
Type: NodePort | |
IP Family Policy: SingleStack | |
IP Families: IPv4 | |
IP: 10.96.34.241 | |
IPs: 10.96.34.241 | |
Port: http 80/TCP | |
TargetPort: http/TCP | |
NodePort: http 32552/TCP | |
Endpoints: 10.244.0.7:80 | |
Port: https 443/TCP | |
TargetPort: https/TCP | |
NodePort: https 31396/TCP | |
Endpoints: 10.244.0.7:443 | |
Port: 7687-tcp 7687/TCP | |
TargetPort: 7687-tcp/TCP | |
NodePort: 7687-tcp 31188/TCP | |
Endpoints: 10.244.0.7:7687 | |
Session Affinity: None | |
External Traffic Policy: Cluster | |
Events: | |
Type Reason Age From Message | |
---- ------ ---- ---- ------- | |
Normal IPAllocated 24m metallb-controller Assigned IP ["172.18.255.201"] | |
Normal nodeAssigned 24m metallb-speaker announcing from node "kind-worker2" with protocol "layer2" | |
➜ ~ k get all -n neo4j -o wide | |
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES | |
pod/neo4j-1-0 1/1 Running 0 134m 10.244.3.4 kind-worker2 <none> <none> | |
pod/neo4j-2-0 1/1 Running 0 133m 10.244.1.5 kind-worker3 <none> <none> | |
pod/neo4j-3-0 1/1 Running 0 133m 10.244.2.5 kind-worker <none> <none> | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR | |
service/neo4j-1 ClusterIP 10.96.126.211 <none> 7687/TCP,7474/TCP,7473/TCP 134m app=neo4j-db,helm.neo4j.com/instance=neo4j-1 | |
service/neo4j-1-admin ClusterIP 10.96.73.159 <none> 6362/TCP,7687/TCP,7474/TCP,7473/TCP 134m app=neo4j-db,helm.neo4j.com/instance=neo4j-1 | |
service/neo4j-1-internals ClusterIP None <none> 6362/TCP,7687/TCP,7474/TCP,7473/TCP,7688/TCP,5000/TCP,7000/TCP,6000/TCP 134m app=neo4j-db,helm.neo4j.com/instance=neo4j-1 | |
service/neo4j-2 ClusterIP 10.96.153.68 <none> 7687/TCP,7474/TCP,7473/TCP 133m app=neo4j-db,helm.neo4j.com/instance=neo4j-2 | |
service/neo4j-2-admin ClusterIP 10.96.196.50 <none> 6362/TCP,7687/TCP,7474/TCP,7473/TCP 133m app=neo4j-db,helm.neo4j.com/instance=neo4j-2 | |
service/neo4j-2-internals ClusterIP None <none> 6362/TCP,7687/TCP,7474/TCP,7473/TCP,7688/TCP,5000/TCP,7000/TCP,6000/TCP 133m app=neo4j-db,helm.neo4j.com/instance=neo4j-2 | |
service/neo4j-3 ClusterIP 10.96.101.132 <none> 7687/TCP,7474/TCP,7473/TCP 133m app=neo4j-db,helm.neo4j.com/instance=neo4j-3 | |
service/neo4j-3-admin ClusterIP 10.96.87.75 <none> 6362/TCP,7687/TCP,7474/TCP,7473/TCP 133m app=neo4j-db,helm.neo4j.com/instance=neo4j-3 | |
service/neo4j-3-internals ClusterIP None <none> 6362/TCP,7687/TCP,7474/TCP,7473/TCP,7688/TCP,5000/TCP,7000/TCP,6000/TCP 133m app=neo4j-db,helm.neo4j.com/instance=neo4j-3 | |
service/neo4j-db-lb-neo4j LoadBalancer 10.96.81.172 172.18.255.200 7474:30289/TCP,7473:31007/TCP,7687:30094/TCP 134m app=neo4j-db,helm.neo4j.com/clustering=true,helm.neo4j.com/neo4j.loadbalancer=include | |
NAME READY AGE CONTAINERS IMAGES | |
statefulset.apps/neo4j-1 1/1 134m neo4j neo4j:5.7.0-enterprise | |
statefulset.apps/neo4j-2 1/1 133m neo4j neo4j:5.7.0-enterprise | |
statefulset.apps/neo4j-3 1/1 133m neo4j neo4j:5.7.0-enterprise | |
➜ ~ k describe -n neo4j service/neo4j-db-lb-neo4j | |
Name: neo4j-db-lb-neo4j | |
Namespace: neo4j | |
Labels: app=neo4j-db | |
app.kubernetes.io/managed-by=Helm | |
helm.neo4j.com/neo4j.name=neo4j-db | |
helm.neo4j.com/service=neo4j | |
Annotations: helm.sh/resource-policy: keep | |
meta.helm.sh/release-name: neo4j-1 | |
meta.helm.sh/release-namespace: neo4j | |
Selector: app=neo4j-db,helm.neo4j.com/clustering=true,helm.neo4j.com/neo4j.loadbalancer=include | |
Type: LoadBalancer | |
IP Family Policy: SingleStack | |
IP Families: IPv4 | |
IP: 10.96.81.172 | |
IPs: 10.96.81.172 | |
LoadBalancer Ingress: 172.18.255.200 | |
Port: http 7474/TCP | |
TargetPort: 7474/TCP | |
NodePort: http 30289/TCP | |
Endpoints: 10.244.1.5:7474,10.244.2.5:7474,10.244.3.4:7474 | |
Port: https 7473/TCP | |
TargetPort: 7473/TCP | |
NodePort: https 31007/TCP | |
Endpoints: 10.244.1.5:7473,10.244.2.5:7473,10.244.3.4:7473 | |
Port: tcp-bolt 7687/TCP | |
TargetPort: 7687/TCP | |
NodePort: tcp-bolt 30094/TCP | |
Endpoints: 10.244.1.5:7687,10.244.2.5:7687,10.244.3.4:7687 | |
Session Affinity: None | |
External Traffic Policy: Local | |
HealthCheck NodePort: 31460 | |
Events: <none> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment