12月 21, 2025
33 分で読める

ジュニアクラウドエンジニア向けGCP面接対策:完全ガイド

interview
career-advice
job-search
entry-level
ジュニアクラウドエンジニア向けGCP面接対策:完全ガイド
MB

Milad Bonakdar

著者

ジュニアクラウドエンジニアの採用面接に向けて、Compute Engine、Cloud Storage、VPC、IAM、そしてGoogle Cloudの中核となるコンセプトを網羅した、必須GCPの基礎知識を習得するための包括的な面接対策ガイドです。


はじめに

Google Cloud Platform (GCP) は、コンピューティング、ストレージ、ネットワーク、ビッグデータ、機械学習機能を提供する包括的なクラウドコンピューティングサービススイートです。ジュニアクラウドエンジニアとして、クラウドインフラストラクチャを構築および管理するには、GCP のコアサービスに関する基礎知識が必要です。

このガイドでは、ジュニア GCP クラウドエンジニア向けの重要な面接の質問を、Compute Engine、Cloud Storage、VPC、および IAM に焦点を当てて説明します。


GCP Compute Engine

1. Google Compute Engine とは何ですか?また、その主なユースケースは何ですか?

回答: Compute Engine は、Google のデータセンターで実行されるスケーラブルな仮想マシンを提供します。

主な機能:

  • カスタムまたは事前定義されたマシンタイプ
  • 永続ディスクとローカル SSD
  • コスト削減のためのプリエンプティブ VM
  • メンテナンスのためのライブマイグレーション
  • グローバルロードバランシング

ユースケース:

  • Web ホスティング
  • アプリケーションサーバー
  • バッチ処理
  • ハイパフォーマンスコンピューティング
# VMインスタンスの作成
gcloud compute instances create my-instance \
  --zone=us-central1-a \
  --machine-type=e2-medium \
  --image-family=debian-11 \
  --image-project=debian-cloud

# インスタンスの一覧表示
gcloud compute instances list

# インスタンスへのSSH接続
gcloud compute ssh my-instance --zone=us-central1-a

# インスタンスの停止
gcloud compute instances stop my-instance --zone=us-central1-a

希少度: 非常に一般的 難易度: 簡単


2. 永続ディスクとローカル SSD の違いについて説明してください。

回答:

機能永続ディスクローカル SSD
耐久性データは永続的に保持されるVM が停止するとデータは失われる
パフォーマンス良好非常に優れている(低レイテンシ)
サイズ最大 64 TB最大 9 TB
ユースケースブートディスク、データストレージ一時的なキャッシュ、スクラッチスペース
コスト低い高い
スナップショットサポートされているサポートされていない

例:

# 永続ディスクを持つVMの作成
gcloud compute instances create my-vm \
  --boot-disk-size=50GB \
  --boot-disk-type=pd-ssd

# ローカルSSDを持つVMの作成
gcloud compute instances create my-vm \
  --local-ssd interface=NVME

希少度: 一般的 難易度: 簡単~普通


GCP Cloud Storage

3. Cloud Storage のさまざまなストレージクラスは何ですか?

回答: Cloud Storage は、さまざまなアクセスパターンに対して複数のクラスを提供します。

クラスユースケース可用性最小期間コスト
Standard頻繁にアクセスされる99.95%なし最高
Nearline月に 1 回未満99.9%30 日低い
Coldline四半期に 1 回未満99.9%90 日非常に低い
Archive年に 1 回未満99.9%365 日最低
# バケットの作成
gsutil mb -c STANDARD -l us-central1 gs://my-bucket

# ファイルのアップロード
gsutil cp myfile.txt gs://my-bucket/

# オブジェクトの一覧表示
gsutil ls gs://my-bucket/

# ファイルのダウンロード
gsutil cp gs://my-bucket/myfile.txt ./

# ストレージクラスの変更
gsutil rewrite -s NEARLINE gs://my-bucket/myfile.txt

希少度: 非常に一般的 難易度: 簡単~普通


GCP VPC (Virtual Private Cloud)

4. VPC とは何ですか?また、その主要なコンポーネントは何ですか?

回答: VPC は、GCP リソースの接続を提供する仮想ネットワークです。

主要なコンポーネント:

Loading diagram...

コンポーネント:

  1. サブネット: リージョンの IP 範囲
  2. ファイアウォールルール: トラフィックの制御
  3. ルート: トラフィックパスの定義
  4. VPC ピアリング: VPC の接続
  5. Cloud VPN: オンプレミスへの接続
# VPC の作成
gcloud compute networks create my-vpc \
  --subnet-mode=custom

# サブネットの作成
gcloud compute networks subnets create my-subnet \
  --network=my-vpc \
  --region=us-central1 \
  --range=10.0.1.0/24

# ファイアウォールルールの作成 (SSH の許可)
gcloud compute firewall-rules create allow-ssh \
  --network=my-vpc \
  --allow=tcp:22 \
  --source-ranges=0.0.0.0/0

希少度: 非常に一般的 難易度: 普通


5. GCP でのファイアウォールルールの仕組みについて説明してください。

回答: ファイアウォールルールは、受信および送信トラフィックを制御します。

特徴:

  • ステートフル (戻りトラフィックは自動的に許可される)
  • ネットワークまたは特定のインスタンスに適用される
  • 優先度ベース (0~65535、低いほど優先度が高い)
  • デフォルト: 送信は許可、受信は拒否

ルールコンポーネント:

  • 方向 (ingress/egress)
  • 優先度
  • アクション (allow/deny)
  • 送信元/宛先
  • プロトコルとポート
# HTTP トラフィックの許可
gcloud compute firewall-rules create allow-http \
  --network=my-vpc \
  --allow=tcp:80 \
  --source-ranges=0.0.0.0/0 \
  --target-tags=web-server

# 内部通信の許可
gcloud compute firewall-rules create allow-internal \
  --network=my-vpc \
  --allow=tcp:0-65535,udp:0-65535,icmp \
  --source-ranges=10.0.0.0/8

# 特定のトラフィックの拒否
gcloud compute firewall-rules create deny-telnet \
  --network=my-vpc \
  --action=DENY \
  --rules=tcp:23 \
  --priority=1000

希少度: 非常に一般的 難易度: 普通


GCP IAM

6. GCP における IAM のロールと権限について説明してください。

回答: IAM は、誰がどのリソースで何ができるかを制御します。

主要な概念:

  • メンバー: ユーザー、サービスアカウント、またはグループ
  • ロール: 権限のコレクション
  • ポリシー: メンバーをロールにバインドする

ロールの種類:

  1. プリミティブ: オーナー、編集者、閲覧者 (広範囲)
  2. 事前定義: サービス固有 (例: Compute Admin)
  3. カスタム: ユーザー定義の権限
# ユーザーへのロールの付与
gcloud projects add-iam-policy-binding my-project \
  --member=user:[email protected] \
  --role=roles/compute.instanceAdmin.v1

# サービスアカウントへのロールの付与
gcloud projects add-iam-policy-binding my-project \
  --member=serviceAccount:[email protected] \
  --role=roles/storage.objectViewer

# IAM ポリシーの一覧表示
gcloud projects get-iam-policy my-project

# ロールの削除
gcloud projects remove-iam-policy-binding my-project \
  --member=user:[email protected] \
  --role=roles/compute.instanceAdmin.v1

ベストプラクティス:

  • 可能な限り事前定義されたロールを使用する
  • 最小権限の原則に従う
  • アプリケーションにはサービスアカウントを使用する
  • 権限の定期的な監査

希少度: 非常に一般的 難易度: 普通


GCP コアコンセプト

7. GCP のリージョンとゾーンとは何ですか?

回答:

リージョン:

  • 地理的な場所 (例: us-central1、europe-west1)
  • 複数のゾーンを含む
  • 独立した障害ドメイン
  • レイテンシ、コンプライアンス、コストに基づいて選択

ゾーン:

  • リージョン内の隔離された場所
  • 単一の障害ドメイン
  • 高可用性のために複数のゾーンにデプロイ
Loading diagram...

例:

# リージョンの一覧表示
gcloud compute regions list

# ゾーンの一覧表示
gcloud compute zones list

# 特定のゾーンにインスタンスを作成
gcloud compute instances create my-vm \
  --zone=us-central1-a

希少度: 非常に一般的 難易度: 簡単


8. サービスアカウントとは何ですか?また、いつ使用しますか?

回答: サービスアカウント は、アプリケーションと VM のための特別なアカウントです。

特徴:

  • 人間用ではない
  • アプリケーションによって使用される
  • IAM ロールを持つことができる
  • 認証用のキーを作成できる

ユースケース:

  • Cloud Storage にアクセスする VM インスタンス
  • GCP API を呼び出すアプリケーション
  • CI/CD パイプライン
  • プロジェクト間アクセス
# サービスアカウントの作成
gcloud iam service-accounts create my-sa \
  --display-name="My Service Account"

# サービスアカウントへのロールの付与
gcloud projects add-iam-policy-binding my-project \
  --member=serviceAccount:[email protected] \
  --role=roles/storage.objectViewer

# VM へのアタッチ
gcloud compute instances create my-vm \
  [email protected] \
  --scopes=cloud-platform

希少度: 一般的 難易度: 簡単~普通


サーバーレスとメッセージング

9. Cloud Pub/Sub とは何ですか?また、いつ使用しますか?

回答: Cloud Pub/Sub は、非同期通信のためのフルマネージドメッセージングサービスです。

主要な概念:

  • トピック: メッセージが送信される名前付きリソース
  • サブスクリプション: メッセージストリームを表す名前付きリソース
  • パブリッシャー: トピックにメッセージを送信する
  • サブスクライバー: サブスクリプションからメッセージを受信する

アーキテクチャ:

Loading diagram...

基本的な操作:

# トピックの作成
gcloud pubsub topics create my-topic

# サブスクリプションの作成
gcloud pubsub subscriptions create my-subscription \
  --topic=my-topic \
  --ack-deadline=60

# メッセージの公開
gcloud pubsub topics publish my-topic \
  --message="Hello, World!"

# メッセージのプル
gcloud pubsub subscriptions pull my-subscription \
  --auto-ack \
  --limit=10

パブリッシャーの例 (Python):

from google.cloud import pubsub_v1
import json

# パブリッシャー クライアントの作成
publisher = pubsub_v1.PublisherClient()
topic_path = publisher.topic_path('my-project', 'my-topic')

# メッセージの公開
def publish_message(data):
    message_json = json.dumps(data)
    message_bytes = message_json.encode('utf-8')
    
    # 属性付きで公開
    future = publisher.publish(
        topic_path,
        message_bytes,
        event_type='order_created',
        user_id='123'
    )
    
    print(f'公開されたメッセージ ID: {future.result()}')

# 効率的なバッチ公開
def publish_batch(messages):
    futures = []
    for message in messages:
        message_bytes = json.dumps(message).encode('utf-8')
        future = publisher.publish(topic_path, message_bytes)
        futures.append(future)
    
    # すべてのメッセージが公開されるのを待つ
    for future in futures:
        future.result()

サブスクライバーの例 (Python):

from google.cloud import pubsub_v1

subscriber = pubsub_v1.SubscriberClient()
subscription_path = subscriber.subscription_path('my-project', 'my-subscription')

def callback(message):
    print(f'受信したメッセージ: {message.data.decode("utf-8")}')
    print(f'属性: {message.attributes}')
    
    # メッセージの処理
    try:
        process_message(message.data)
        message.ack()  # 正常な処理の確認応答
    except Exception as e:
        print(f'メッセージの処理エラー: {e}')
        message.nack()  # 否定応答 (再試行)

# サブスクライブ
streaming_pull_future = subscriber.subscribe(subscription_path, callback=callback)

print(f'{subscription_path} でのメッセージをリッスンしています...')

try:
    streaming_pull_future.result()
except KeyboardInterrupt:
    streaming_pull_future.cancel()

サブスクリプションの種類:

1. プルサブスクリプション:

# サブスクライバーはオンデマンドでメッセージをプルする
gcloud pubsub subscriptions create pull-sub \
  --topic=my-topic

2. プッシュサブスクリプション:

# Pub/Sub は HTTPS エンドポイントにメッセージをプッシュする
gcloud pubsub subscriptions create push-sub \
  --topic=my-topic \
  --push-endpoint=https://myapp.example.com/webhook

ユースケース:

  • イベント駆動型アーキテクチャ
  • マイクロサービス通信
  • ストリーム処理パイプライン
  • IoT データ取り込み
  • 非同期タスク処理

ベストプラクティス:

  • メッセージ属性をフィルタリングに使用する
  • べき等なメッセージ処理を実装する
  • 適切な確認応答期限を設定する
  • 失敗したメッセージにはデッドレタートピックを使用する
  • サブスクリプションバックログを監視する

希少度: 一般的 難易度: 普通


10. Cloud Functions とは何ですか?また、どのようにデプロイしますか?

回答: Cloud Functions は、イベント駆動型アプリケーションを構築するためのサーバーレス実行環境です。

トリガー:

  • HTTP リクエスト
  • Cloud Pub/Sub メッセージ
  • Cloud Storage イベント
  • Firestore イベント
  • Firebase イベント

HTTP 関数の例:

# main.py
import functions_framework
from flask import jsonify

@functions_framework.http
def hello_http(request):
    """HTTP Cloud Function"""
    request_json = request.get_json(silent=True)
    
    if request_json and 'name' in request_json:
        name = request_json['name']
    else:
        name = 'World'
    
    return jsonify({
        'message': f'Hello, {name}!',
        'status': 'success'
    })

Pub/Sub 関数の例:

import base64
import json
import functions_framework

@functions_framework.cloud_event
def process_pubsub(cloud_event):
    """Pub/Sub メッセージによってトリガーされる"""
    # メッセージのデコード
    message_data = base64.b64decode(cloud_event.data["message"]["data"]).decode()
    message_json = json.loads(message_data)
    
    print(f'メッセージの処理: {message_json}')
    
    # メッセージの処理
    result = process_data(message_json)
    
    return result

Storage 関数の例:

import functions_framework

@functions_framework.cloud_event
def process_file(cloud_event):
    """Cloud Storage オブジェクトの作成によってトリガーされる"""
    data = cloud_event.data
    
    bucket = data["bucket"]
    name = data["name"]
    
    print(f'ファイル {name}{bucket} にアップロードされました')
    
    # ファイルの処理
    process_uploaded_file(bucket, name)

デプロイメント:

# HTTP 関数のデプロイ
gcloud functions deploy hello_http \
  --runtime=python39 \
  --trigger-http \
  --allow-unauthenticated \
  --entry-point=hello_http \
  --region=us-central1

# Pub/Sub 関数のデプロイ
gcloud functions deploy process_pubsub \
  --runtime=python39 \
  --trigger-topic=my-topic \
  --entry-point=process_pubsub \
  --region=us-central1

# Storage 関数のデプロイ
gcloud functions deploy process_file \
  --runtime=python39 \
  --trigger-resource=my-bucket \
  --trigger-event=google.storage.object.finalize \
  --entry-point=process_file \
  --region=us-central1

# 環境変数を使用したデプロイ
gcloud functions deploy my_function \
  --runtime=python39 \
  --trigger-http \
  --set-env-vars DATABASE_URL=...,API_KEY=...

# 特定のメモリとタイムアウトを使用したデプロイ
gcloud functions deploy my_function \
  --runtime=python39 \
  --trigger-http \
  --memory=512MB \
  --timeout=300s

Requirements ファイル:

# requirements.txt
functions-framework==3.*
google-cloud-storage==2.*
google-cloud-pubsub==2.*
requests==2.*

ローカルでのテスト:

# Functions Framework のインストール
pip install functions-framework

# ローカルでの実行
functions-framework --target=hello_http --port=8080

# curl でのテスト
curl -X POST http://localhost:8080 \
  -H "Content-Type: application/json" \
  -d '{"name": "Alice"}'

モニタリング:

# ログの表示
gcloud functions logs read hello_http \
  --region=us-central1 \
  --limit=50

# 関数の詳細の表示
gcloud functions describe hello_http \
  --region=us-central1

ベストプラクティス:

  • 関数を小さく、焦点を絞る
  • 環境変数を使用して構成を行う
  • 適切なエラー処理を実装する
  • 適切なタイムアウト値を設定する
  • Cloud Logging をデバッグに使用する
  • コールドスタート時間を最小限に抑える

希少度: 非常に一般的 難易度: 簡単~普通


CLI とツール

11. 一般的な gcloud CLI コマンドと構成について説明してください。

回答: gcloud CLI は、GCP リソースを管理するための主要なツールです。

初期設定:

# gcloud SDK のインストール (macOS)
curl https://sdk.cloud.google.com | bash
exec -l $SHELL

# 初期化と認証
gcloud init

# ログイン
gcloud auth login

# デフォルトプロジェクトの設定
gcloud config set project my-project-id

# デフォルトリージョン/ゾーンの設定
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-a

構成管理:

# 構成の一覧表示
gcloud config configurations list

# 新しい構成の作成
gcloud config configurations create dev-config

# 構成のアクティブ化
gcloud config configurations activate dev-config

# プロパティの設定
gcloud config set account [email protected]
gcloud config set project dev-project

# 現在の構成の表示
gcloud config list

# プロパティの解除
gcloud config unset compute/zone

サービス別の一般的なコマンド:

Compute Engine:

# インスタンスの一覧表示
gcloud compute instances list

# インスタンスの作成
gcloud compute instances create my-vm \
  --machine-type=e2-medium \
  --zone=us-central1-a

# インスタンスへのSSH接続
gcloud compute ssh my-vm --zone=us-central1-a

# インスタンスの停止/開始
gcloud compute instances stop my-vm --zone=us-central1-a
gcloud compute instances start my-vm --zone=us-central1-a

# インスタンスの削除
gcloud compute instances delete my-vm --zone=us-central1-a

Cloud Storage:

# バケットの一覧表示
gsutil ls

# バケットの作成
gsutil mb -l us-central1 gs://my-bucket

# ファイルのアップロード
gsutil cp myfile.txt gs://my-bucket/

# ファイルのダウンロード
gsutil cp gs://my-bucket/myfile.txt ./

# ディレクトリの同期
gsutil -m rsync -r ./local-dir gs://my-bucket/remote-dir

# バケットライフサイクルの設定
gsutil lifecycle set lifecycle.json gs://my-bucket

IAM:

# IAM ポリシーの一覧表示
gcloud projects get-iam-policy my-project

# IAM バインディングの追加
gcloud projects add-iam-policy-binding my-project \
  --member=user:[email protected] \
  --role=roles/viewer

# サービスアカウントの作成
gcloud iam service-accounts create my-sa \
  --display-name="My Service Account"

# キーの作成とダウンロード
gcloud iam service-accounts keys create key.json \
  [email protected]

Kubernetes Engine:

# クラスターの一覧表示
gcloud container clusters list

# 認証情報の取得
gcloud container clusters get-credentials my-cluster \
  --zone=us-central1-a

# クラスターの作成
gcloud container clusters create my-cluster \
  --num-nodes=3 \
  --zone=us-central1-a

便利なフラグ:

# 出力のフォーマット
gcloud compute instances list --format=json
gcloud compute instances list --format=yaml
gcloud compute instances list --format="table(name,zone,status)"

# 結果のフィルタリング
gcloud compute instances list --filter="zone:us-central1-a"
gcloud compute instances list --filter="status=RUNNING"

# 結果の制限
gcloud compute instances list --limit=10

# 結果のソート
gcloud compute instances list --sort-by=creationTimestamp

役立つコマンド:

# ヘルプの取得
gcloud help
gcloud compute instances create --help

# プロジェクト情報の表示
gcloud projects describe my-project

# 利用可能なリージョン/ゾーンの一覧表示
gcloud compute regions list
gcloud compute zones list

# クォータの表示
gcloud compute project-info describe \
  --project=my-project

# API の有効化
gcloud services enable compute.googleapis.com

# 有効な API の一覧表示
gcloud services list --enabled

ベストプラクティス:

  • 異なる環境には構成を使用する
  • デフォルトプロジェクトとリージョンを設定する
  • スクリプトには --format を使用する
  • 結果を絞り込むには --filter を使用する
  • コマンド補完を有効にする
  • gcloud SDK を最新の状態に保つ

希少度: 非常に一般的 難易度: 簡単~普通


結論

ジュニア GCP クラウドエンジニアの面接の準備には、コアサービスとクラウドの概念を理解する必要があります。以下に焦点を当ててください。

  1. Compute Engine: VM インスタンス、マシンタイプ、ディスク
  2. Cloud Storage: ストレージクラス、バケット、ライフサイクル
  3. VPC: ネットワーク、サブネット、ファイアウォールルール
  4. IAM: ロール、権限、サービスアカウント
  5. コアコンセプト: リージョン、ゾーン、プロジェクト

GCP Console と gcloud CLI を使用して、実践的な経験を積んでください。頑張ってください!

Newsletter subscription

実際に機能する週次のキャリアのヒント

最新の洞察をメールボックスに直接お届けします

Decorative doodle

次の面接は履歴書一つで決まる

数分でプロフェッショナルで最適化された履歴書を作成。デザインスキルは不要—証明された結果だけ。

私の履歴書を作成

この投稿を共有

面接のコールバックを2倍に

求人内容に合わせて履歴書をカスタマイズする候補者は、2.5倍多くの面接を獲得します。当社のAIを使用して、すべての応募に対して即座に自動カスタマイズできます。