tests/

directory
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2021 License: Apache-2.0

README

HAProxy

HAProxy kubernetes ingress controller in kind

prerequisites

kind

GO111MODULE="on" go get sigs.k8s.io/kind@v0.8.1

How to 🏃 it

./create.sh

it will create all the services, pods, resources needed for initial start

all services are build from https://github.com/oktalz/go-web-simple, each has it unique response

for http services u can test

curl --header "Host: hr.haproxy" 127.0.0.1:30080/gids

response will be from 4 pods (example is 8 requests):

zagreb-TH9-1
zagreb-PAQ-1
zagreb-X34-1
zagreb-XVT-1
zagreb-TH9-2
zagreb-PAQ-2
zagreb-X34-2
zagreb-XVT-2

[SERVICE]-[ID]-[RESPONSE_COUNTER]

  • you can see what service and what pod (each has its own id) gives response.
  • last number is response number so you can see how many request was put to each service

for second http service

curl --header "Host: fr.haproxy" 127.0.0.1:30080/gids

for pure tcp service

curl 127.0.0.1:32767/gids

bash

  • to enter container use:
name=$(kubectl get --namespace=haproxy-controller pods \
-o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' \
--sort-by=.metadata.creationTimestamp | grep haproxy-ingress | tail -1); \
kubectl exec -it --namespace=haproxy-controller $name -- /bin/sh

K9s - Kubernetes CLI

  • after starting press 0 to see all namespaces

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL