Virtual host missing selector

You're viewing Apigee and Apigee hybrid documentation.
There is no equivalent Apigee Edge documentation for this topic.

Symptom

An ApigeeIssue with Reason AIS_VIRTUALHOST_MISSING_SELECTOR is shown when viewing resources in the apigee namespace.

Error messages

After running kubectl -n apigee get apigeeissues , an error like the following is displayed:

NAME                                           SEVERITY   REASON                             DOCUMENTATION                                                                                  AGE
vhost-missing-selector-my-org-my-virtualhost   ERROR      AIS_VIRTUALHOST_MISSING_SELECTOR   https://cloud.google.com/apigee/docs/hybrid/troubleshooting/AIS_VIRTUALHOST_MISSING_SELECTOR   5h18m

Cause: Virtualhost is missing ingress selector

A virtualhost declared in overrides.yaml does not have the ingress selector field set.

Diagnosis

Run the following command:

kubectl -n apigee describe apigeeissue ISSUE_NAME 

Where ISSUE_NAME is the name of the issue. For example, vhost-missing-selector-my-org-my-virtualhost .

The output should look similar to the following:

 Name 
 : 
  
 vhost 
 - 
 missing 
 - 
 selector 
 - 
 my 
 - 
 org 
 - 
 my 
 - 
 virtualhost 
 Namespace 
 : 
  
 apigee 
 Labels 
 : 
  
 ais 
 - 
 reason 
 = 
 AIS_VIRTUALHOST_MISSING_SELECTOR 
 Annotations 
 : 
  
< none 
 > 
 API 
  
 Version 
 : 
  
 apigee 
 . 
 cloud 
 . 
 google 
 . 
 com 
 / 
 v1alpha1 
 Kind 
 : 
  
 ApigeeIssue 
 Metadata 
 : 
  
 Creation 
  
 Timestamp 
 : 
  
 2023 
 - 
 06 
 - 
 12 
 T17 
 : 
 03 
 : 
 43 
 Z 
  
 Generation 
 : 
  
 1 
  
 Owner 
  
 References 
 : 
  
 API 
  
 Version 
 : 
  
 apigee 
 . 
 cloud 
 . 
 google 
 . 
 com 
 / 
 v1alpha2 
  
 Kind 
 : 
  
 ApigeeOrganization 
  
 Name 
 : 
  
 my 
 - 
 org 
  
 UID 
 : 
  
 7 
 e83a52c 
 - 
 ce00 
 - 
 4 
 bed 
 - 
 98 
 be 
 - 
 55835 
 ada1817 
  
 Resource 
  
 Version 
 : 
  
 3281563 
  
 UID 
 : 
  
 adc775c2 
 - 
 376d 
 - 
 4 
 bf9 
 - 
 9860 
 - 
 500 
 b2b2b8273 
 Spec 
 : 
  
 Details 
 : 
  
 Expected 
  
 ingress 
  
 selector 
  
 in 
  
 ApigeeRouteConfig 
  
 "my-org-my-virtualhost" 
 . 
  
 Environment 
  
 Group 
 / 
 virtual 
  
 host 
  
 "my-virtualhost" 
  
 is 
  
 missing 
  
 an 
  
 ingress 
  
 selector 
 . 
  
 Documentation 
 : 
  
 https 
 : 
 // 
 cloud 
 . 
 google 
 . 
 com 
 / 
 apigee 
 / 
 docs 
 / 
 hybrid 
 / 
 troubleshooting 
 / 
 AIS_VIRTUALHOST_MISSING_SELECTOR 
  
 Reason 
 : 
  
 AIS_VIRTUALHOST_MISSING_SELECTOR 
  
 Severity 
 : 
  
 WARNING 
 Events 
 : 
  
< none 
 > 
 Spec 
 : 
  
 Details 
 : 
  
 Expected 
  
 ingress 
  
 selector 
  
 in 
  
 ApigeeRouteConfig 
  
 "my-org-my-virtualhost" 
 . 
  
 Environment 
  
 Group 
 / 
 virtual 
  
 host 
  
 "my-virtualhost" 
  
 is 
  
 missing 
  
 an 
  
 ingress 
  
 selector 
 . 

The contents of Spec.Details explains the name of the virtualhost which is missing the ingress selector.

Resolution

  1. Use kubectl describe to check the details of the issue:

    kubectl -n apigee describe apigeeissue ISSUE_NAME 
    

    Where ISSUE_NAME is the name of the issue. For example, vhost-missing-selector-my-org-my-virtualhost .

  2. Determine the virtualhost name from the Spec.Details field.

    In this example, the virtualhost is called my-virtualhost .

  3. Find the corresponding virtualhost in your overrides.yaml .

    virtualhosts:
    ...
    - name: my-virtualhost
      sslCertPath: ./certs/vhost.pem
      sslKeyPath: ./certs/vhost.key
    ...
  4. Update the virtualhost and add the ingress selector:

    virtualhosts:
    ...
    - name: my-virtualhost
      selector:
        app: apigee-ingressgateway
      sslCertPath: ./certs/vhost.pem
      sslKeyPath: ./certs/vhost.key
    ...
  5. Apply the change to the virtualhost:

    helm upgrade ENV_GROUP_NAME 
    apigee-virtualhost/ \
      --namespace apigee \
      --set envgroup= ENV_GROUP_NAME 
    \
      -f overrides.yaml

Must gather diagnostic information

If the problem persists even after following the above instructions, gather the following diagnostic information and then contact Google Cloud Customer Care :

  1. The Google Cloud Project ID.
  2. The name of the Apigee hybrid organization.
  3. The Spec.Details field of the ApigeeIssue .
Create a Mobile Website
View Site in Mobile | Classic
Share by: