git pushでkubernetesのpodのイメージ更新まで自動化出来たので手順を残します。

How To Automate Deployments to DigitalOcean Kubernetes with CircleCI
githubに公開しました。
実現したいことgit push したタイミングでcirclec ...digitaloceanのkubernetesにECRのprivate registryを追加する

add AWS ECR private registry
コンテナレジストリをDigital Ocean RegistryからAWS ECRへ変更しました。
背景circle CIからの自動デプロイのテストで、digital ...
circle ciからkubernetesを操作するアカウントの作成

ServiceAccount
admin権限での操作は危険とのことで特定のサービスのみ利用できるkubernetesアカウントを作成する
githubにpubilcでレポジトリを作成しました。
environCloudFlare CDNにDNSを切り替えた後も接続元のリアルIPを取得したい!

もともとSSL証明書のみ発行したら、LBへのDNS Aレコード設定をやめて、CloudFlare経由(proxy)に切り替える予定でした。
負荷軽減、高速化、セキュリティの面でメリットがあるため。
CloudFlar ...その他の設定-接続元IPアドレス取得,coredns,メール送信等-DigitalOceanのkubernetes環境にwordpressを構築する07

その他の変更点接続元IPアドレスを正しいものにしたい背景
/wp-login.phpへのアクセス制限をかけているので、デフォルトだとすべてのIPアドレスがDOKSのIPアドレスになってしまい、403で接続できません。
Servic ...永続ストレージの利用-DigitalOceanのkubernetes環境にwordpressを構築する06

永続ストレージの利用
最初は/var/www/htmlはイメージ化して利用する予定
でしたが、CMSには向いていないと思い永続ボリュームを利用することにしました。
SSL/TLS証明書取得-DigitalOceanのkubernetes環境にwordpressを構築する05

SSL/TLS証明書取得cert-managerのインストールmanifestからの場合 apply -f
helmの場合
helm repo add jetstack repo updatehelm inst
helmの場合
helm repo add jetstack repo updatehelm inst
DBセキュア接続設定とConfigmapでの環境変数の利用-DigitalOceanのkubernetes環境にwordpressを構築する04

DBセキュア接続設定とConfigmapでの環境変数の利用DB接続証明書設定GCEで作業root@instance-1:~/work/mariadb-cert/cert# cat client-key.pem client-cert.pem ...
カスタムイメージからwordpress起動-DigitalOceanのkubernetes環境にwordpressを構築する03

カスタムイメージからwordpress起動
kubernetes環境とコンテナレジストリは連携済みなので、先程ローカルからpushしたイメージで起動させてみます。
namespaceの作成ocarina@ab350-pro4:~/ ...ローカル環境でwordpressをセットアップする-DigitalOceanのkubernetes環境にwordpressを構築する02

DOKSの手順のwordpressではなくwordpressのdockerイメージから作ります。
ローカルで作業します
download & rundocker pull wordpress:latestdocker ru ...