Comments (2)
I suggest we create/generate a ktew.env
file. Use the same name on each host. The file will tell the what kind of node it should install, and all the information it needs.
from kubernetes_the_easy_way.
json for etcd test
{
"type": "etcd",
"hostname": "k8s-etcd-03",
"install": {
"type": "remote",
"location": "https://lighthouse.net:8000/clusters/4/k8s-etcd-01"
},
"etcd_cluster": [{
"hostname": "k8s-etcd-01",
"ip": "192.168.0.25",
"version": "v3.2.11",
"status": "not-ready"
},
{
"hostname": "k8s-etcd-02",
"ip": "192.168.0.26",
"version": "v3.2.11",
"status": "ready"
},
{
"hostname": "k8s-etcd-03",
"ip": "192.168.0.27",
"version": "v3.2.11",
"status": "ready"
}
]
}
Getting data we need :
export my_hostname=$(cat etcd.json | jq '.hostname' | tr -d \")
export my_ip=$(cat etcd.json | jq '.etcd_cluster[] | select (.hostname=="'$my_hostname'") | .ip' | tr -d \")
export other_ips=$(cat etcd.json | jq '.etcd_cluster[] | select (.hostname=="'$my_hostname'" | not) | .ip' | tr -d \" | tr '\n' ',' | sed 's/,$//g')
export cluster_list=$(cat etcd.json | jq '.etcd_cluster[] | " \(.hostname)=https://\(.ip)"' | tr -d \" | tr '\n' ',' | sed 's/,$//g')
from kubernetes_the_easy_way.
Related Issues (20)
- Loadbalancer dublicates deploy of k8s objects when > 2 nodes HOT 2
- Services does not work duo to kube-proxy bug HOT 5
- kubectl get nodes , master node is missing HOT 2
- Add load balancers to weave net network HOT 4
- Use a private network range for Pod CIDR HOT 4
- unable to do ssh to the machine HOT 2
- Define custom hosts entries in /etc/hosts on each machine HOT 1
- Update traefik to newest version
- no route to host HOT 9
- Switch to coreDNS HOT 3
- Update to 1.10.7 HOT 3
- Accessibility of the cluster HOT 2
- How to make use of own docker registry HOT 8
- password for vagrant boxes to do scp HOT 3
- Make loadbalancer survice a reboot
- Update to 1.9.9 and release HOT 1
- Tools: Add prometheus example
- info required for storage provisor HOT 3
- Unable to connect to the server: dial tcp 192.168.50.20:6443: i/o timeout HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes_the_easy_way.