Telepresence
Telepresenceはk8sを利用した開発時に開発マシンにinstallしていると便利なもので、指定したk8s上のpodをproxy podに置き換えて、k8s上のpodへの通信をlocalのコンテナに、localのコンテナからの通信をproxy podからk8s上に返すことができるツールです。
Telepresence: https://www.telepresence.io/
TelepresenceをCentOS7にinstall
install手順は公式のここに書いてあるのですが、CentOS7用の手順がありません。検索するとこれがでてきますが微妙に動かないのでinstall手順を以下に整理しました。
- 作業ディレクトリ作成
install作業中にgit cloneコマンドを実行してtelepresenceリポジトリを落としてきたりするので作業用ディレクトリを作って作業します。
mkdir telepresence
cd telepresence
- telepresence_centos7.sh作成 コマンドを順番に実行しても良いのですがinstallスクリプトをtelepresence_centos7.shとして作成してinstall作業を進めます。以下の内容でtelepresence_centos7.shを作成してください。
#!/bin/bash
set -ex
yum update -y
# install python3.6
yum -y install yum-utils
yum -y groupinstall development
yum install -y https://repo.ius.io/ius-release-el7.rpm
yum -y install python36u
#echo "`python3.6 -v` installed."
# python 3.6 installed
# install system dependencies
yum install -y git torsocks sshfs conntrack
git clone https://github.com/datawire/telepresence.git && cd telepresence
# force the install to use python3.6
sed -i "s/python3/python3.6/" install.sh
env PREFIX=/usr/local ./install.sh
echo "Telepresence `telepresence --version` installed!"
- install実行
bash telepresence_centos7.sh
最後にTelepresence 0.109-16-g601cad6-dirty installed!
などと出力されれば成功です。telepresence
コマンドが使えるようになっているはずです。