Skip to content

Instantly share code, notes, and snippets.

@seasonny
Last active September 25, 2019 15:59
Show Gist options
  • Select an option

  • Save seasonny/6a405a709a4732a1419382db07a275d5 to your computer and use it in GitHub Desktop.

Select an option

Save seasonny/6a405a709a4732a1419382db07a275d5 to your computer and use it in GitHub Desktop.
create simple app for dns logger
oc new-project dns-checker
oc new-app nginx:1.12~https://github.com/sclorg/nginx-container.git --context-dir=1.12/
oc expose svc/nginx-container
cat <<EOF | oc apply -f -
apiVersion: v1
kind: Pod
metadata:
name: dns-checker
spec:
containers:
- name: dns-checker
image: busybox
command: [ "/bin/sh", "-c", "--" ]
args: [ "while true; do sleep 3; date >> /tmp/dns-checker.log; nc -v nginx-container 8080 >> /tmp/dns-checker.log 2>&1; done;" ]
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment