第6章 クラスター管理者のセットアップ
認証
AllowAll Authentication メソッドを使用して認証を設定します。
AllowAll 認証
すべてのパスワードを許可する認証モデルを設定します。OpenShift マスターで /etc/origin/master/master-config.yaml を編集し、DenyAll PasswordIdentityProvider の値を AllowAllPasswordIdentityProvider に変更します。次に、OpenShift マスターを再起動します。
認証モデルが設定されたため、admin/admin など、ユーザーとしてログインします。
# oc login openshift master e.g. https://1.1.1.1:8443 --username=admin --password=admin
admin ユーザーアカウントに cluster-admin ロールを付与します。
# oc login -u system:admin -n default Logged into "https:// <<openshift_master_fqdn>>:8443" as "system:admin" using existing credentials. You have access to the following projects and can switch between them with 'oc project <projectname>': *default glusterfs infra-storage kube-public kube-system management-infra openshift openshift-infra openshift-logging openshift-node openshift-sdn openshift-web-console Using project "default". # oc adm policy add-cluster-role-to-user cluster-admin admin cluster role "cluster-admin" added: "admin"
認証方法の詳細は、https://access.redhat.com/documentation/ja-jp/openshift_container_platform/3.11/html-single/configuring_clusters/#identity-providers-configuring を参照してください。