This file contains 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
kind: VirtualService | |
metadata: | |
name: recommendation | |
spec: | |
hosts: | |
- recommendation | |
http: | |
- route: | |
- destination: | |
host: recommendation |
This file contains 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
kind: VirtualService | |
metadata: | |
name: recommendation | |
spec: | |
hosts: | |
- recommendation | |
http: | |
- route: | |
- destination: | |
host: recommendation |
This file contains 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
kind: VirtualService | |
metadata: | |
name: recommendation | |
spec: | |
hosts: | |
- recommendation | |
http: | |
- fault: | |
delay: | |
fixedDelay: 7.000s |
This file contains 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
kubectl delete -f recommendation-fault.yaml |
This file contains 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
kind: VirtualService | |
metadata: | |
name: recommendation | |
spec: | |
hosts: | |
- recommendation | |
http: | |
- route: | |
- destination: | |
host: recommendation |
This file contains 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
kubectl get pods -l app=recommendation | |
NAME READY STATUS RESTARTS AGE | |
recommendation-v1-798bf87d96-d9d95 2/2 Running 0 1h | |
recommendation-v2-7bc4f7f696-d9j2m 2/2 Running 0 1h |
This file contains 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
$ systemctl daemon-reload | |
$ systemctl enable etcd | |
$ systemctl start etcd | |
$ etcdctl cluster-health |
This file contains 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
$ yum install etcd -y | |
$ touch /etc/etcd.env | |
$ echo "PEER_NAME=$PEER_NAME" >> /etc/etcd.env | |
$ echo "PRIVATE_IP=$PRIVATE_IP" >> /etc/etcd.env |
This file contains 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
$ export PEER_NAME=$(hostname) | |
$ export PRIVATE_IP=$(ip addr show eth0 | grep -Po 'inet \K[\d.]+') | |
$ cfssl print-defaults csr > config.json | |
$ sed -i 's/www\.example\.net/'"$PRIVATE_IP"'/' config.json | |
$ sed -i 's/example\.net/'"$PEER_NAME"'/' config.json | |
$ sed -i '0,/CN/{s/example\.net/'"$PEER_NAME"'/}' config.json | |
$ cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=server config.json | cfssljson -bare server | |
$ cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=peer config.json | cfssljson -bare peer |
This file contains 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
$ cfssl gencert -initca ca-csr.json | cfssljson -bare ca - | |
$ cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=client client.json | cfssljson -bare client |
NewerOlder