{"type":"MODIFIED","object":{"kind":"Endpoints","apiVersion":"v1","metadata":{"name":"nginx","namespace":"default","selfLink":"/api/v1/namespaces/default/endpoints/nginx","uid":"ce671363-942c-11e6-87dc-42010a8a008d","resourceVersion":"377076","creationTimestamp":"2016-10-17T05:44:44Z","labels":{"run":"nginx"}},"subsets":[{"addresses":[{"ip":"10.176.0.64","nodeName":"gke-k0-default-pool-12695b58-7ocd","targetRef":{"kind":"Pod","namespace":"default","name":"nginx-1172225296-q3bqn","uid":"547a6452-962d-11e6-87dc-42010a8a008d","resourceVersion":"376530"}},{"ip":"10.176.0.65","nodeName":"gke-k0-default-pool-12695b58-7ocd","targetRef":{"kind":"Pod","namespace":"default","name":"nginx-1172225296-rt6ec","uid":"969ec182-962d-11e6-87dc-42010a8a008d","resourceVersion"
:"376762"}},{"ip":"10.176.0.66","nodeName":"gke-k0-default-pool-12695b58-7ocd","targetRef":{"kind":"Pod","namespace":"default","name":"nginx-1172225296-wf2mk","uid":"969f1171-962d-11e6-87dc-42010a8a008d","resourceVersion":"376766"}},{"ip":"10.176.1.79"
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
Aug 09 04:07:53 ns-2 systemd[1]: Started consul. | |
Aug 09 04:07:53 ns-2 consul[2772]: ==> WARNING: Expect Mode enabled, expecting 3 servers | |
Aug 09 04:07:53 ns-2 consul[2772]: ==> Starting Consul agent... | |
Aug 09 04:07:53 ns-2 consul[2772]: ==> Consul agent running! | |
Aug 09 04:07:53 ns-2 consul[2772]: Version: 'v0.9.0' | |
Aug 09 04:07:53 ns-2 consul[2772]: Node ID: 'a32f25b0-ba01-f18a-ec09-225dd071cad9' | |
Aug 09 04:07:53 ns-2 consul[2772]: Node name: 'ns-2' | |
Aug 09 04:07:53 ns-2 consul[2772]: Datacenter: 'dc1' | |
Aug 09 04:07:53 ns-2 consul[2772]: Server: true (bootstrap: false) | |
Aug 09 04:07:53 ns-2 consul[2772]: Client Addr: 0.0.0.0 (HTTP: 8500, HTTPS: -1, DNS: 8600) |
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
Aug 09 04:07:58 ns-1 systemd[1]: Started consul. | |
Aug 09 04:07:58 ns-1 consul[2806]: ==> WARNING: Expect Mode enabled, expecting 3 servers | |
Aug 09 04:07:58 ns-1 consul[2806]: ==> Starting Consul agent... | |
Aug 09 04:07:58 ns-1 consul[2806]: ==> Consul agent running! | |
Aug 09 04:07:58 ns-1 consul[2806]: Version: 'v0.9.0' | |
Aug 09 04:07:58 ns-1 consul[2806]: Node ID: 'd98946a5-0a05-0187-8eba-41a5dfb2d5f4' | |
Aug 09 04:07:58 ns-1 consul[2806]: Node name: 'ns-1' | |
Aug 09 04:07:58 ns-1 consul[2806]: Datacenter: 'dc1' | |
Aug 09 04:07:58 ns-1 consul[2806]: Server: true (bootstrap: false) | |
Aug 09 04:07:58 ns-1 consul[2806]: Client Addr: 0.0.0.0 (HTTP: 8500, HTTPS: -1, DNS: 8600) |
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
Aug 09 03:18:04 ns-2 systemd[1]: Started consul. | |
Aug 09 03:18:04 ns-2 consul[2817]: ==> WARNING: Expect Mode enabled, expecting 3 servers | |
Aug 09 03:18:04 ns-2 consul[2817]: ==> Starting Consul agent... | |
Aug 09 03:18:04 ns-2 consul[2817]: ==> Consul agent running! | |
Aug 09 03:18:04 ns-2 consul[2817]: Version: 'v0.9.0' | |
Aug 09 03:18:04 ns-2 consul[2817]: Node ID: 'a60458ce-7305-4d5d-f0f7-a9c6a8dddc83' | |
Aug 09 03:18:04 ns-2 consul[2817]: Node name: 'ns-2' | |
Aug 09 03:18:04 ns-2 consul[2817]: Datacenter: 'dc1' | |
Aug 09 03:18:04 ns-2 consul[2817]: Server: true (bootstrap: false) | |
Aug 09 03:18:04 ns-2 consul[2817]: Client Addr: 0.0.0.0 (HTTP: 8500, HTTPS: -1, DNS: 8600) |
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
/usr/local/bin/consul agent \ | |
-advertise=X.X.X.X \ | |
-bind=0.0.0.0 \ | |
-bootstrap-expect=3 \ | |
-client=0.0.0.0 \ | |
-data-dir=/var/lib/consul \ | |
-retry-join-gce-project-name hightowerlabs \ | |
-retry-join-gce-tag-value consul \ | |
-server \ | |
-ui |
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
{ | |
"spec":{ | |
"$setElementOrder/containers":[ | |
{ | |
"name":"nginx" | |
}, | |
{ | |
"name":"envoy" | |
} | |
], |
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
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
name: app | |
name: app | |
spec: | |
replicas: 1 | |
template: |
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
gcloud compute instance-groups unmanaged create taiwan \ | |
--zone asia-east1-a | |
gcloud compute instance-groups unmanaged add-instances taiwan \ | |
--instances $(kubectl get nodes \ | |
--context taiwan \ | |
--output=jsonpath='{range .items[*]}{.metadata.name},{end}') \ | |
--zone asia-east1-a | |
gcloud compute instance-groups set-named-ports taiwan \ |
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
// Compile with: | |
// GOOS=linux go build -a --ldflags '-extldflags "-static"' -tags netgo -installsuffix netgo -o dns-example main.go | |
// | |
// Run on Kubernetes. Example resolv.conf | |
// | |
// # /etc/reslov.conf | |
// search default.svc.cluster.local svc.cluster.local cluster.local google.internal c.hightowerlabs.internal | |
// nameserver 10.179.240.10 | |
// options ndots:5 | |
// |
{"type":"MODIFIED","object":{"kind":"Endpoints","apiVersion":"v1","metadata":{"name":"nginx","namespace":"default","selfLink":"/api/v1/namespaces/default/endpoints/nginx","uid":"ce671363-942c-11e6-87dc-42010a8a008d","resourceVersion":"377076","creationTimestamp":"2016-10-17T05:44:44Z","labels":{"run":"nginx"}},"subsets":[{"addresses":[{"ip":"10.176.0.64","nodeName":"gke-k0-default-pool-12695b58-7ocd","targetRef":{"kind":"Pod","namespace":"default","name":"nginx-1172225296-q3bqn","uid":"547a6452-962d-11e6-87dc-42010a8a008d","resourceVersion":"376530"}},{"ip":"10.176.0.65","nodeName":"gke-k0-default-pool-12695b58-7ocd","targetRef":{"kind":"Pod","namespace":"default","name":"nginx-1172225296-rt6ec","uid":"969ec182-962d-11e6-87dc-42010a8a008d","resourceVersion"
:"376762"}},{"ip":"10.176.0.66","nodeName":"gke-k0-default-pool-12695b58-7ocd","targetRef":{"kind":"Pod","namespace":"default","name":"nginx-1172225296-wf2mk","uid":"969f1171-962d-11e6-87dc-42010a8a008d","resourceVersion":"376766"}},{"ip":"10.176.1.79"