Install With kubectl

Install Verrazzano using kubectl

The following instructions show you how to install Verrazzano in a single Kubernetes cluster using kubectl.

Prerequisites

Prepare for the installation

Before installing Verrazzano, see instructions on preparing Kubernetes platforms and installing the Verrazzano CLI (optional). Make sure that you have a valid kubeconfig file pointing to the Kubernetes cluster that you want to use for installing Verrazzano.

NOTE: Verrazzano can create network policies that can be used to limit the ports and protocols that pods use for network communication. Network policies provide additional security but they are enforced only if you install a Kubernetes Container Network Interface (CNI) plug-in that enforces them, such as Calico. For instructions on how to install a CNI plug-in, see the documentation for your Kubernetes cluster.

You can install Verrazzano using the Verrazzano CLI or with kubectl. See the following respective sections.

Install the Verrazzano platform operator

Verrazzano provides a platform operator to manage the life cycle of Verrazzano installations. Using the Verrazzano custom resource, you can install, uninstall, and upgrade Verrazzano installations.

To install the Verrazzano platform operator:

  1. Deploy the Verrazzano platform operator.

    $ kubectl apply -f https://github.com/verrazzano/verrazzano/releases/download/v1.7.2/verrazzano-platform-operator.yaml
    

  2. Wait for the deployment to complete.

    $ kubectl -n verrazzano-install rollout status deployment/verrazzano-platform-operator
    
    # Expected response
    deployment "verrazzano-platform-operator" successfully rolled out
    

  3. Confirm that the operator pod is correctly defined and running.

     $ kubectl -n verrazzano-install get pods
    
     # Sample output
     NAME                                            READY   STATUS    RESTARTS   AGE
     verrazzano-platform-operator-59d5c585fd-lwhsx   1/1     Running   0          114s
    

Perform the installation

Verrazzano supports the following installation profiles: development (dev), production (prod), and managed cluster (managed-cluster). For more information, see Installation Profiles.

This document shows how to create a basic Verrazzano installation using:

  • The development (dev) installation profile
  • Wildcard-DNS, where DNS is provided by nip.io (the default)

NOTE: Because the dev profile installs self-signed certificates, when installing Verrazzano on macOS, you might see: Your connection is not private. For a workaround, see this FAQ.

For a complete description of Verrazzano configuration options, see the Verrazzano Custom Resource Definition.

To use other DNS options, see Customzing DNS for more details.

Install Verrazzano

To create a Verrazzano installation as described in the previous section, run the following commands.

$ kubectl apply -f - <<EOF
apiVersion: install.verrazzano.io/v1beta1
kind: Verrazzano
metadata:
  name: example-verrazzano
spec:
  profile: ${VZ_PROFILE:-dev}
EOF
$ kubectl wait \
  --timeout=20m \
  --for=condition=InstallComplete verrazzano/example-verrazzano

NOTE: If you are installing Verrazzano in an Azure Kubernetes Service (AKS) cluster, add the following annotation for ingressNGINX to access Verrazzano endpoints on Azure.

$ kubectl apply -f - <<EOF
apiVersion: install.verrazzano.io/v1beta1
kind: Verrazzano
metadata:
  name: example-verrazzano
spec:
  profile: dev
  components:
    ingressNGINX:
      overrides:
      - values:
          controller:
            service:
              annotations:
                service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /healthz
    dns:
      wildcard:
        domain: nip.io
EOF

To use a different profile with the previous example, set the VZ_PROFILE environment variable to the name of the profile you want to install.

If an error occurs, check the log output of the installation. You can view the logs with the following command.

  $ kubectl logs -n verrazzano-install \
      -f $(kubectl get pod \
      -n verrazzano-install \
      -l app=verrazzano-platform-operator \
      -o jsonpath="{.items[0].metadata.name}") | grep '^{.*}$' \
      | jq -r '."@timestamp" as $timestamp | "\($timestamp) \(.level) \(.message)"'

Next steps

Verify the installed Verrazzano using kubectl. See Verify Using kubectl.