Last active
December 23, 2020 15:39
-
-
Save gowatana/3b065d9d800d2b65b82e339bcae5310a to your computer and use it in GitHub Desktop.
「httpd on Karbon」とコンテナのホスト名が表示される httpd Pod を起動する。
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: Service | |
apiVersion: v1 | |
metadata: | |
name: httpd-svc | |
spec: | |
type: NodePort | |
ports: | |
- port: 80 | |
protocol: TCP | |
selector: | |
app: httpd | |
--- | |
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: httpd | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: httpd | |
template: | |
metadata: | |
labels: | |
app: httpd | |
spec: | |
containers: | |
- name: httpd | |
image: gowatana/centos7:httpd | |
ports: | |
- containerPort: 80 | |
protocol: TCP | |
command: | |
- bash | |
- -c | |
- | | |
N=$(uname -n); echo '<h1>httpd on Karbon</h1>' $N > /var/www/html/index.html; httpd -D FOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Deployment と Service 作成
アドレスとポート番号を取得
接続確認