Skip to content

Helper scripts and examples for Kubernetes Ingress Controllers

License

Notifications You must be signed in to change notification settings

vinnie357/kic-helpers

Repository files navigation

kic-helpers

helper scripts for building and running Kubernetes Ingress Controllers

The examples are meant to deploy an application and service it with one of the ingress controller types.

  • nginx-ingress
  • nginx-plus-ingress
  • nginx-plus-nap

These examples assume you have a running Kubernetes cluster and valid administrative credentials.

The following sample applications are provided:

  • arcadia

login to your cluster

export KUBECONFIG=$HOME/.kube/myconfig

Initialize helper scripts

. init.sh

secrets

example local vault container requires docker

cd vault-dev
make vault && make test

certs

get a new self signed cert for default ingress

. init.sh && new_cert

nginx

open source

  • building and pushing
      build_kic nginx-ingress 1.11.3 registry.domain.com
  • deploying
  • examples
  • building and pushing
      build_kic nginx-plus-ingress 1.11.3 registry.domain.com
  • deploying assumes your KUBECONFIG is set.
      deploy_kic 1.11.3 registry.domain.com
  • examples

plus app protect

  • building
      build_kic nginx-plus-ingress-nap 1.11.3 registry.domain.com
  • deploying
  • examples

troubleshooting

network tools container

# public
kubectl run multitool --image=praqma/network-multitool
toolPod=$(kubectl get pods -o json | jq -r ".items[].metadata | select(.name | contains (\"multitool\")).name")
kubectl exec -it $toolPod -- sh

# redhat
kubectl run debug-dns --image registry.access.redhat.com/rhel7/rhel-tools -it --rm -- bash

stuck namespace

delete finalizers

NAMESPACE=my-namespace
# check for resources
kubectl -n $NAMESPACE get all
# remove finalizers
kubectl proxy &
kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize

devcontainer

includes:

  • pre-commit
  • go
  • docker
  • terraform
  • terraform-docs

Development

don't forget to add your git user config

git config --global user.name "myuser"
git config --global user.email "myuser@domain.com"

checking for secrets as well as linting is performed by git pre-commit with the module requirements handled in the devcontainer.

testing pre-commit hooks:

# test pre commit manually
pre-commit run -a -v

About

Helper scripts and examples for Kubernetes Ingress Controllers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published