Last active
September 25, 2019 15:59
-
-
Save seasonny/6a405a709a4732a1419382db07a275d5 to your computer and use it in GitHub Desktop.
create simple app for dns logger
This file contains hidden or 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
| 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