Use Cases

Getting started with PingDirectory on Kubernetes

Before you begin

Components

  • PingDirectory

  • Docker

  • Kubernetes

About this task

Follow these steps to run PingDirectory in a Kubernetes container on a MacOS system.

Steps

  1. Optional: If you don’t already have Docker, download and install Docker for Mac. See Docker Desktop.

  2. Launch Docker and enable Kubernetes. See .docker.com/docker-for-mac///[Get started with Docker for Mac] in the Docker documentation.

  3. Verify that Kubernetes is running. See Deploy on Kubernetes in the Docker documentation.

    Example:

    $ kubectl version
    Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
    Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:05:37Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
  4. Confirm that the Kubernetes context is set to your local desktop.

    Kubernetes has contexts that allow you to manage different Kubernetes cluster environments. By default, when Kubernetes is enabled on Docker for Mac, a local context is created.

    Example:

    $ kubectl config current-context
    docker-for-desktop
  5. Create a dashboard to manage your Kubernetes cluster. See .io/docs/tasks/access-application-cluster/web-ui-dashboard///[Web UI (Dashboard)] in the Kubernetes documentation

    Example:

    $ kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
    secret "kubernetes-dashboard-certs" created
    serviceaccount "kubernetes-dashboard" created
    role.rbac.authorization.k8s.io "kubernetes-dashboard-minimal" created
    rolebinding.rbac.authorization.k8s.io "kubernetes-dashboard-minimal" created
    deployment.apps "kubernetes-dashboard" created
    service "kubernetes-dashboard" created
  6. Verify that the dashboard has started.

    Example:

    $ kubectl get pods --namespace=kube-system
    NAME READY STATUS RESTARTS AGE
    etcd-docker-for-desktop 1/1 Running 1 13d
    kube-apiserver-docker-for-desktop 1/1 Running 1 13d
    kube-controller-manager-docker-for-desktop 1/1 Running 1 13d
    kube-dns-86f4d74b45-d72qr 3/3 Running 0 13d
    kube-proxy-2ntt5 1/1 Running 0 13d
    kube-scheduler-docker-for-desktop 1/1 Running 1 13d
    kubernetes-dashboard-7d5dcdb6d9-qqxn9 1/1 Running 0 9m
  7. To enable browsing to the dashboard, set up forwarding from the Kubernetes host to the container port.

    Example:

    $ kubectl port-forward kubernetes-dashboard-7d5dcdb6d9-qqxn9 8443:8443 --namespace=kube-system
    Forwarding from 127.0.0.1:8443 -> 8443
    Forwarding from [::1]:8443 -> 8443
  8. From a browser window, go to the dashboard at https://localhost:8443/.

  9. Obtain and install the Docker image for PingDirectory from https://hub.docker.com/r/pingidentity/pingdirectory/.

  10. Optional: If you don’t already have a license, get a PingDirectory license from the License Key Request Form.

  11. In Kubernetes, create a PingDirectory configmap. See .io/docs/reference/generated/kubectl/kubectl-commands//[configmap Reference] in the Kubernetes documentation.

    Example:

    $ kubectl create configmap ping-directory-config --from-file=/path/to/PingDirectory.lic
    configmap "ping-directory-config" created