Skip to content

Instantly share code, notes, and snippets.

@BruceZu
Last active December 5, 2016 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BruceZu/fbf4b60a2abd615e051f2730118097ef to your computer and use it in GitHub Desktop.
Save BruceZu/fbf4b60a2abd615e051f2730118097ef to your computer and use it in GitHub Desktop.
sonarqube env
localhost and pad name
@BruceZu
Copy link
Author

BruceZu commented Dec 5, 2016

root@sonarqube-1-3688817312-2zvl5:/opt/sonarqube# ping localhost

PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.042 ms
...

root@sonarqube-1-3688817312-2zvl5:/opt/sonarqube# ping sonarqube-1-3688817312-2zvl5

PING sonarqube-1-3688817312-2zvl5 (172.17.0.2): 56 data bytes
64 bytes from 172.17.0.2: icmp_seq=0 ttl=64 time=0.042 ms
...
root@sonarqube-1-3688817312-2zvl5:/opt/sonarqube# curl http://10.0.0.154:9000
//okay

root@sonarqube-1-3688817312-2zvl5:/opt/sonarqube# cat /etc/hosts

# Kubernetes-managed hosts file.
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
fe00::0	ip6-mcastprefix
fe00::1	ip6-allnodes
fe00::2	ip6-allrouters
172.17.0.2	sonarqube-1-3688817312-2zvl5

@BruceZu
Copy link
Author

BruceZu commented Dec 5, 2016

$ kubectl exec sonarqube-1-3688817312-2zvl5 -it -- bash
root@sonarqube-1-3688817312-2zvl5:/opt/sonarqube# env

SONARQUBE_JDBC_PASSWORD=sonar
SONARQUBE_PORT_9000_TCP_PORT=9000
SONARQUBE_PORT_9092_TCP_ADDR=10.0.0.154
HOSTNAME=sonarqube-1-3688817312-2zvl5
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT=tcp://10.0.0.1:443
MY_NGINX_SERVICE_PORT=80
KUBERNETES_SERVICE_PORT=443
SONARQUBE_JDBC_USERNAME=sonar
SONARQUBE_PORT_9092_TCP=tcp://10.0.0.154:9092
KUBERNETES_SERVICE_HOST=10.0.0.1
SONARQUBE_JDBC_URL=
SONARQUBE_HOME=/opt/sonarqube
CA_CERTIFICATES_JAVA_VERSION=20140324
SONARQUBE_SERVICE_PORT_PORT_1=9000
MY_NGINX_PORT_80_TCP_ADDR=10.0.0.127
SONARQUBE_PORT_9000_TCP=tcp://10.0.0.154:9000
SONARQUBE_SERVICE_PORT_PORT_2=9092
MY_NGINX_PORT_80_TCP=tcp://10.0.0.127:80
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SONARQUBE_PORT_9092_TCP_PROTO=tcp
SONARQUBE_PORT_9000_TCP_ADDR=10.0.0.154
PWD=/opt/sonarqube
SONARQUBE_SERVICE_HOST=10.0.0.154
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
LANG=C.UTF-8
JAVA_VERSION=8u111
SONARQUBE_PORT_9092_TCP_PORT=9092
MY_NGINX_PORT=tcp://10.0.0.127:80
SHLVL=1
HOME=/root
JAVA_DEBIAN_VERSION=8u111-b14-2~bpo8+1
SONARQUBE_SERVICE_PORT=9000
KUBERNETES_PORT_443_TCP_PROTO=tcp
KUBERNETES_SERVICE_PORT_HTTPS=443
SONARQUBE_PORT_9000_TCP_PROTO=tcp
MY_NGINX_PORT_80_TCP_PORT=80
MY_NGINX_PORT_80_TCP_PROTO=tcp
KUBERNETES_PORT_443_TCP_ADDR=10.0.0.1
SONARQUBE_PORT=tcp://10.0.0.154:9000
SONAR_VERSION=6.1
MY_NGINX_SERVICE_HOST=10.0.0.127
KUBERNETES_PORT_443_TCP=tcp://10.0.0.1:443
_=/usr/bin/env

root@sonarqube-1-3688817312-2zvl5:/opt/sonarqube#

@BruceZu
Copy link
Author

BruceZu commented Dec 5, 2016

Bruce:~ brucezu$ kubectl get pods -o wide

NAME                           READY     STATUS    RESTARTS   AGE       IP            NODE
curl-2421989462-ikpt0          1/1       Running   1          11d       172.17.0.7    minikube
jenkins-2669788312-ufrud       1/1       Running   0          2h        172.17.0.10   minikube
my-nginx-379829228-vd58q       1/1       Running   2          12d       172.17.0.8    minikube
my-nginx-379829228-wds2e       1/1       Running   2          12d       172.17.0.5    minikube
sonarqube-1-3688817312-2zvl5   1/1       Running   1          10d       172.17.0.2    minikube
sonarqube-1457709634-yb3xa     1/1       Running   1          11d       172.17.0.6    minikube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment