Anthos showing wrong status of Deployment on on-premise external cluster - kubernetes

I wanted to give a try to GCP's Anthos On-Premise GKE offering.
For sake of my demo I setup a Kubernetes cluster in GCP itself using Google Compute Engine following instructions from (https://kubernetes.io/docs/setup/production-environment/turnkey/gce/)
After this I followed Anthos documentation to register my cluster to Anthos. I was able to register the cluster and Login into it using both Token based and Basic authentication based mechanisms.
Now when I try to deploy anything from GCP console, I get following error
But the deployment succeeds, I can see deployment and associated pods in Running state on my cluster.
Also when I try to deploy using Marketplace I get following error.
I wish to know if it is a bug in Anthos or my cluster has some missing configurations ?

You're not running Anthos GKE On-Prem, you're running open-source Kubernetes on Google Cloud. Things designed for Anthos - the marketplace and connecting clusters to Cloud Console - are not supposed to work in your setup. The fact that they mostly work despite that is an accident (and a testament to the portability and compatibility of Kubernetes).
To get Cloud Console integration and use the marketplace, you need to use either Anthos GKE On-Prem that runs on VMWare or regular GKE.

Related

GCP Cloud Composer AirFlow : is it possible to change the kubernetes configuration?

The goal of Google Cloud composer is to have a managed instance of AirFlow via GKE. The goal is not to have to worry about pods deployment.
In my company, an internal security scanning tool is raising a warning about AirFlow pods "Pod airflow-scheduler-XXXXX hasn't any anti affinity".
Is it even possible to take action in the Google Cloud composer side to configure an anti affinity policy ? Even if it's possible, would that be a good idea [given the fact that the goal of Google Cloud composer is supposed be a 100% managed service] ?

GKE - Hybrid Kubernetes cluster

I've been reading the Google Cloud documentation about hybrid GKE cluster with Connect or completely on prem with GKE on-prem and VMWare.
However, I see that GKE with Connect you can manage the on-prem Kubernetes cluster from Google Cloud dashboard.
But, what I am trying to find, is, to mantain a hybrid cluster with GKE mixing on-prem and cloud nodes. Graphical example:
For the above solution, the master node is managed by GCloud, but the ideal solution is to manage multiple node masters (High availability) on cloud and nodes on prem. Graphical example:
Is it possible to apply some or both of the proposed solutions on Google Cloud with GKE?
If you want to maintain hybrid clusters, mixing on prem and cloud nodes, you need to use Anthos.
Anthos is a modern application management platform that provides a consistent development and operations experience for cloud and on-premises environments.
The primary computing environment for Anthos uses Anthos clusters, which extend GKE for use on Google Cloud, on-premises, or multicloud to manage Kubernetes installations in the environments where you intend to deploy your applications. These offerings bundle upstream Kubernetes releases and provide management capabilities for creating, scaling, and upgrading conformant Kubernetes clusters. With Kubernetes installed and running, you have access to a common orchestration layer that manages application deployment, configuration, upgrade, and scaling.
If you want to know more about Anthos in GCP please follow this link.

Kubernetes dashboard via GCP

Sorry to bother you, but i am having a serious issue with my online DevOps learning.
In fact, i am taking a Devops course and we are using the google cloud platform as a cloud. When i create my cluster with gcloud container clusters create xxx and then do the describe command like gcloud container clusters describe xxx, it works but i have no information regarding the login and password to Kubernetes;
That is one of the problem.
After creating the cluster, i got not Kubernetes dashboard link with the command kubectl cluster-info. Normally i should have a Kubernetes dashboard to manage my app. In place of having the Kubernetes dashboard, there is something called Kubernetes system metric.
Can somebody help me fix this problem probably someone who is used to practice on GCP.
Best regards
Can you please go through this Google Cloud Kubernetes dashboards docs[1]?
Because, I'm able to see Kubernetes dashboard in my console. But, I don't know why you are not able to see that, and I also checked there is now any service outage on Kubernetes from Google Cloud Status Dashboard[2]. But, It's working fine. So, kindly go through that Kubernetes docs, from that you will get some better understanding of working with Kubernetes in GCP.
If you're still facing any issue or abnormal behavior, please go to public issue tracker[3] or support from GCP console and raise a ticket.
[1]. https://cloud.google.com/kubernetes-engine/docs/concepts/dashboards
[2]. https://status.cloud.google.com/
[3]. https://cloud.google.com/support/docs/issue-trackers#trackers-list
When you visit the GCP dashboard docs, you should see red warning on top of the website, saying:
Warning: The open source Kubernetes Dashboard addon is deprecated for clusters on GKE and will be removed as an option in version 1.15. As an alternative, use the Cloud Console dashboards described in this guide.
Below you read:
Starting with GKE v1.15, you will no longer be able to enable the Kubernetes Dashboard by using the add-on API. You will still be able to install Kubernetes Dashboard manually by following the instructions in the project's repository. For clusters in which you have already deployed the add-on, it will continue to function but you will need to manually apply any updates and security patches that are released.
To deploy it, follow the instructions on k8s dashboard github repo

What happened to Cloud Run for GKE?

Several resources on the web point to the existence of Cloud Run for GKE. For example, this Google codelabs, this YouTube video from Google and this LinkedIn training video.
However the Cloud Run for GKE functionality seems to have disappeared when you try to create a new Kubernetes cluster, using the Google Cloud web console. The checkboxes to enable Istio and Cloud Run for GKE underneath "Additional features" are not available anymore. (see 3:40 on this LinkedIn video tutorial)
The official documentation about Cloud run for GKE also seems to have disappeared or changed and replaced with documentation about Cloud Run on Anthos.
So, in short, what happened to Cloud Run for GKE?
You first need to create a GKE cluster and then when creating cloud run choose CloudRun for Anthos so, it's not really gone anywhere.
If it was greyed out, that was probably because you had to tick "enabled stackdriver..."
I think it is just a change of words and not functionality.
If you check this documentation out you'll see it specifically says:
This guide shows how to set up a new Google Kubernetes Engine cluster with Cloud Run for Anthos on Google Cloud enabled.
It starts off with creating a GKE cluster which has two ways:
Using GCP console
Using gcloud command-line tool
I prefer gcloud command-line tool using which you need the following command to create a cluster:
gcloud beta container clusters create CLUSTER_NAME \
--addons=HorizontalPodAutoscaling,HttpLoadBalancing,Istio,CloudRun \
--machine-type=n1-standard-4 \
--cluster-version=GKE_VERSION
--enable-stackdriver-kubernetes \
--scopes cloud-platform
If you look closely at the add-ons, you will see it has Istio and CloudRun. The most important flag here is --enable-stackdriver-kubernetes, you would have to enable Stackdriver for Kubernetes in order to move forward.
Looking at your question, I believe you are using GCP Console. The same should be done via console. If you choose the appropriate version of GKE, it will give you options to enable Istio ad well as Cloud Run.
Initially, the checkbox to Enable Cloud Run for Anthos (beta) will be grayed out if Enable legacy Stackdriver Logging service and Enable legacy Stackdriver Monitoring service is enabled Enable Stackdriver Kubernetes Engine Monitoring disabled.
So firstly select Enable Stackdriver Kubernetes Engine Monitoring and now after selecting Enable Istio (beta), you should see the checkbox for Enable Cloud Run for Anthos (beta) working.
Here is the list of available GKE versions for Cloud Run.
If you follow the guide carefully, you will simply be able to create a GKE cluster and deploy a Hello World application on Cloud Run for Anthos (GKE).
I hope this helps!!
Cloud Run for GKE did not disappear but it was simply renamed to "Cloud Run for Anthos".
Initially I thought Anthos was a technology for multicloud environments, but it seems to be more of a "brand name".
The answer is that Anthos is not really a technology, but more of a
brand, a wrapper around Google's cloud crown jewels, Kubernetes (K8s).
This is quoted from this post on TheRegister.

Installation of Istio on GKE / Google Cloud

I have created a free account on GCP as also my first cluster.
I want to deploy istio on my GKE cluster, so I am following the official instructions.
At some point, the instructions indicate that I should
Ensure that the Google Kubernetes Engine API is enabled for your
project (also found by navigating to “APIs & Services” -> “Dashboard”
in the navigation bar)
What is that supposed to mean?
Isn't the API already active since I have created and I am running a cluster?
How can a cluster be running without the API being enabled?
Enabling GKE API is the prerequisite for running GKE. If you already run GKE then you can skip this part.
You can enable Istio as a part of GKE cluster creation. Here is the good instruction from Google: https://cloud.google.com/istio/docs/istio-on-gke/installing
Those information how to install Istio on GKE - described "Istio instalation on GKE add-on".
If you are interested with the instructions how to install Istio manually you can find instructions from google here.
To verify disable/enable API for GKE, please run:
APIs & Services
type:
Kubernetes Engine API
This overview provide more information about this api.