<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Agones – Guides</title>
    <link>/site/docs/guides/</link>
    <description>Recent content in Guides on Agones</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Wed, 02 Jan 2019 00:00:00 +0000</lastBuildDate>
    
	  <atom:link href="/site/docs/guides/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: Feature Stages</title>
      <link>/site/docs/guides/feature-stages/</link>
      <pubDate>Thu, 26 Sep 2019 01:20:41 +0000</pubDate>
      
      <guid>/site/docs/guides/feature-stages/</guid>
      <description>
        
        
        

&lt;h2 id=&#34;supported-versions&#34;&gt;Supported Versions&lt;/h2&gt;

&lt;p&gt;Agones versions are expressed as x.y.z, where x is the major version, y is the minor version, and z is the patch version
, following &lt;a href=&#34;http://semver.org/&#34;&gt;Semantic Versioning&lt;/a&gt; terminology.&lt;/p&gt;

&lt;h2 id=&#34;agones-features&#34;&gt;Agones Features&lt;/h2&gt;

&lt;p&gt;A feature within Agones can be in &lt;code&gt;Alpha&lt;/code&gt;, &lt;code&gt;Beta&lt;/code&gt; or &lt;code&gt;Stable&lt;/code&gt; stage.&lt;/p&gt;

&lt;h2 id=&#34;feature-gates&#34;&gt;Feature Gates&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Alpha&lt;/code&gt; and &lt;code&gt;Beta&lt;/code&gt; features can be enabled or disabled through the &lt;code&gt;agones.featureGates&lt;/code&gt; configuration option
that can be found in the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/#configuration&#34;&gt;Helm configuration&lt;/a&gt; documentation.&lt;/p&gt;

&lt;p&gt;The current set of &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; feature gates are:&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature Name&lt;/th&gt;
&lt;th&gt;Gate&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Since&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Multicluster Allocation&lt;sup&gt;*&lt;/sup&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;Enabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Beta&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.6.0&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;Example Gate (not in use)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Example&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;0.13.0&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;/site/site/docs/reference/gameserver/&#34;&gt;Port Allocations to Multiple Containers&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ContainerPortAllocation&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Beta&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.7.0&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;&lt;a href=&#34;/site/site/docs/guides/player-tracking/&#34;&gt;Player Tracking&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;PlayerTracking&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disabled&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Alpha&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1.6.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;sup&gt;*&lt;/sup&gt;Multicluster Allocation was started before this process was in place, and therefore does not have a
 feature gate and cannot be disabled.&lt;/p&gt;

&lt;h2 id=&#34;description-of-stages&#34;&gt;Description of Stages&lt;/h2&gt;

&lt;h3 id=&#34;alpha&#34;&gt;Alpha&lt;/h3&gt;

&lt;p&gt;An &lt;code&gt;Alpha&lt;/code&gt; feature means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Disabled by default.&lt;/li&gt;
&lt;li&gt;Might be buggy. Enabling the feature may expose bugs.&lt;/li&gt;
&lt;li&gt;Support for this feature may be dropped at any time without notice.&lt;/li&gt;
&lt;li&gt;The API may change in incompatible ways in a later software release without notice.&lt;/li&gt;
&lt;li&gt;Recommended for use only in short-lived testing clusters, due to increased risk of bugs and lack of long-term support.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
Please do try &lt;code&gt;Alpha&lt;/code&gt; features and give feedback on them. This is important to ensure less breaking changes
through the &lt;code&gt;Beta&lt;/code&gt; period.
&lt;/div&gt;


&lt;h3 id=&#34;beta&#34;&gt;Beta&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;Beta&lt;/code&gt; feature means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enabled by default, but able to be disabled through a feature gate.&lt;/li&gt;
&lt;li&gt;The feature is well tested. Enabling the feature is considered safe.&lt;/li&gt;
&lt;li&gt;Support for the overall feature will not be dropped, though details may change.&lt;/li&gt;
&lt;li&gt;The schema and/or semantics of objects may change in incompatible ways in a subsequent beta or stable releases. When
this happens, we will provide instructions for migrating to the next version. This may require deleting, editing,
and re-creating API objects. The editing process may require some thought. This may require downtime for
applications that rely on the feature.&lt;/li&gt;
&lt;li&gt;Recommended for only non-business-critical uses because of potential for incompatible changes in subsequent releases.
If you have multiple clusters that can be upgraded independently, you may be able to relax this restriction.&lt;/li&gt;
&lt;/ul&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
Note: Please do try &lt;code&gt;Beta&lt;/code&gt; features and give feedback on them! After they exit beta, it may not be practical for us
to make more changes.
&lt;/div&gt;


&lt;h3 id=&#34;stable&#34;&gt;Stable&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;Stable&lt;/code&gt; feature means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The feature is enabled and the corresponding feature gate no longer exists.&lt;/li&gt;
&lt;li&gt;Stable versions of features will appear in released software for many subsequent versions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;feature-stage-indicators&#34;&gt;Feature Stage Indicators&lt;/h2&gt;

&lt;p&gt;There are a variety of features with Agones, how can we determine what stage each feature is in?&lt;/p&gt;

&lt;p&gt;Below are indicators for each type of functionality that can be used to determine the feature stage for a given aspect
of Agones.&lt;/p&gt;

&lt;h3 id=&#34;custom-resource-definitions-crds&#34;&gt;Custom Resource Definitions (CRDs)&lt;/h3&gt;

&lt;p&gt;This refers to Kubernetes resource for Agones, such as &lt;code&gt;GameServer&lt;/code&gt;, &lt;code&gt;Fleet&lt;/code&gt; and &lt;code&gt;GameServerAllocation&lt;/code&gt;.&lt;/p&gt;

&lt;h4 id=&#34;new-crds&#34;&gt;New CRDs&lt;/h4&gt;

&lt;p&gt;For new resources, the stage of the resource will be indicated by the &lt;code&gt;apiVersion&lt;/code&gt; of the resource.&lt;/p&gt;

&lt;p&gt;For example: &lt;code&gt;apiVersion: &amp;quot;agones.dev/v1&amp;quot;&lt;/code&gt; is a &lt;code&gt;stable&lt;/code&gt; resource, &lt;code&gt;apiVersion: &amp;quot;agones.dev/v1beta1&amp;quot;&lt;/code&gt; is a &lt;code&gt;beta&lt;/code&gt;
 stage resource, and &lt;code&gt;apiVersion: &amp;quot;agones.dev/v1alpha1&amp;quot;&lt;/code&gt; is an &lt;code&gt;alpha&lt;/code&gt; stage resource.&lt;/p&gt;

&lt;h4 id=&#34;new-crd-attributes&#34;&gt;New CRD attributes&lt;/h4&gt;

&lt;p&gt;When &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes are added to an existing stable Agones CRD, we will follow the Kubernetes &lt;a href=&#34;https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md#adding-unstable-features-to-stable-versions&#34;&gt;&lt;em&gt;Adding
 Unstable Features to Stable Versions&lt;/em&gt;&lt;/a&gt;
Guide to optimise on the least amount of breaking changes for users as attributes progress through feature stages.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes will be added to the existing CRD as &lt;code&gt;optional&lt;/code&gt; and documented with their feature stage.
Attempting to populate these &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes on an Agones CRD will return a validation error if their
 accompanying Feature Flag is not enabled.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; attributes can be subject to change of name and structure, and will result in breaking changes
 before moving to a &lt;code&gt;stable&lt;/code&gt; stage. These changes will be outlined in release notes and feature documentation.&lt;/p&gt;

&lt;h3 id=&#34;agones-game-server-sdk&#34;&gt;Agones Game Server SDK&lt;/h3&gt;

&lt;p&gt;Any &lt;code&gt;alpha&lt;/code&gt; or &lt;code&gt;beta&lt;/code&gt; Game Server SDK functionality will be a subpackage of the &lt;code&gt;sdk&lt;/code&gt; package. For example
, functionality found in a &lt;code&gt;sdk.alphav1&lt;/code&gt; package should be considered at the &lt;code&gt;alpha&lt;/code&gt; feature stage.&lt;/p&gt;

&lt;p&gt;Only experimental functionality will be found in any &lt;code&gt;alpha&lt;/code&gt; and &lt;code&gt;beta&lt;/code&gt; SDK packages, and as such may change as
development occurs.&lt;/p&gt;

&lt;p&gt;As SDK features move to through feature stages towards &lt;code&gt;stable&lt;/code&gt;, the previous version of the SDK API
will remain for at least one release to enable easy migration to the more stable feature stage (i.e. from &lt;code&gt;alpha
&lt;/code&gt; -&amp;gt; &lt;code&gt;beta&lt;/code&gt;, &lt;code&gt;beta&lt;/code&gt; -&amp;gt; &lt;code&gt;stable&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Any other SDK functionality not marked as &lt;code&gt;alpha&lt;/code&gt; or &lt;code&gt;beta&lt;/code&gt; is assumed to be &lt;code&gt;stable&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&#34;rest-grpc-apis&#34;&gt;REST &amp;amp; gRPC APIs&lt;/h3&gt;

&lt;p&gt;REST and gRPC API will have versioned paths where appropriate to indicate their feature stage.&lt;/p&gt;

&lt;p&gt;For example, a REST API with a prefix of &lt;code&gt;v1alpha1&lt;/code&gt; is an &lt;code&gt;alpha&lt;/code&gt; stage feature:
&lt;code&gt;http://api.example.com/v1alpha1/exampleaction&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Similar to the SDK, any &lt;code&gt;alpha&lt;/code&gt; or &lt;code&gt;beta&lt;/code&gt; gRPC functionality will be a subpackage of the main API package.
For example, functionality found in a &lt;code&gt;api.alphav1&lt;/code&gt; package should be considered at the &lt;code&gt;alpha&lt;/code&gt; feature stage.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Agones Game Server Client SDKs</title>
      <link>/site/docs/guides/client-sdks/</link>
      <pubDate>Wed, 02 Jan 2019 10:16:30 +0000</pubDate>
      
      <guid>/site/docs/guides/client-sdks/</guid>
      <description>
        
        
        

&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;

&lt;p&gt;The client SDKs are required for a game server to work with Agones.&lt;/p&gt;

&lt;p&gt;The current supported SDKs are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/unreal/&#34;&gt;Unreal Engine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/unity/&#34;&gt;Unity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/cpp/&#34;&gt;C++&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/nodejs/&#34;&gt;Node.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/go/&#34;&gt;Go&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/rust/&#34;&gt;Rust&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/site/site/docs/guides/client-sdks/rest/&#34;&gt;REST&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The SDKs are relatively thin wrappers around &lt;a href=&#34;https://grpc.io&#34;&gt;gRPC&lt;/a&gt; generated clients,
or an implementation of the REST API (exposed via &lt;a href=&#34;https://github.com/grpc-ecosystem/grpc-gateway&#34;&gt;grpc-gateway&lt;/a&gt;),
where gRPC client generation and compilation isn&amp;rsquo;t well supported.&lt;/p&gt;

&lt;p&gt;They connect to a small process that Agones coordinates to run alongside the Game Server
in a Kubernetes &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/&#34;&gt;&lt;code&gt;Pod&lt;/code&gt;&lt;/a&gt;.
This means that more languages can be supported in the future with minimal effort
(but pull requests are welcome! 😊 ).&lt;/p&gt;

&lt;p&gt;There is also &lt;a href=&#34;/site/site/docs/guides/client-sdks/local/&#34;&gt;local development tooling&lt;/a&gt; for working against the SDK locally,
without having to spin up an entire Kubernetes infrastructure.&lt;/p&gt;

&lt;h2 id=&#34;connecting-to-the-sdk-server&#34;&gt;Connecting to the SDK Server&lt;/h2&gt;

&lt;p&gt;Starting with Agones 1.1.0, the port that the SDK Server listens on for incoming gRPC or HTTP requests is
configurable. This provides flexibility in cases where the default port conflicts with a port that is needed
by the game server.&lt;/p&gt;

&lt;p&gt;Agones will automatically set the following environment variables on all game server containers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AGONES_SDK_GRPC_PORT&lt;/code&gt;: The port where the gRPC server is listening (defaults to 9357)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AGONES_SDK_HTTP_PORT&lt;/code&gt;: The port where the grpc-gateway is listening (defaults to 9358)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The SDKs will automatically discover and connect to the gRPC port specified in the environment variable.&lt;/p&gt;

&lt;p&gt;If your game server requires using a REST client, it is advised to use the port from the environment variable,
otherwise your game server will not be able to contact the SDK server if it is configured to use a non-default port.&lt;/p&gt;

&lt;h2 id=&#34;function-reference&#34;&gt;Function Reference&lt;/h2&gt;

&lt;p&gt;While each of the SDKs are canonical to their languages, they all have the following
functions that implement the core responsibilities of the SDK.&lt;/p&gt;

&lt;p&gt;For language specific documentation, have a look at the respective source (linked above),
and the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
.&lt;/p&gt;

&lt;p&gt;Calling any of state changing functions mentioned below does not guarantee that GameServer Custom Resource object would actually change its state right after the call. For instance, it could be moved to the &lt;code&gt;Shutdown&lt;/code&gt; state elsewhere (for example, when a fleet scales down), which leads to no changes in &lt;code&gt;GameServer&lt;/code&gt; object. You can verify the result of this call by waiting for the desired state in a callback to WatchGameServer() function.&lt;/p&gt;

&lt;p&gt;Functions which changes GameServer state or settings are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ready()&lt;/li&gt;
&lt;li&gt;Shutdown()&lt;/li&gt;
&lt;li&gt;SetLabel()&lt;/li&gt;
&lt;li&gt;SetAnnotation()&lt;/li&gt;
&lt;li&gt;Allocate()&lt;/li&gt;
&lt;li&gt;Reserve()&lt;/li&gt;
&lt;li&gt;Alpha().SetCapacity()&lt;/li&gt;
&lt;li&gt;Alpha().PlayerConnect()&lt;/li&gt;
&lt;li&gt;Alpha().PlayerDisconnect()&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&#34;lifecycle-management&#34;&gt;Lifecycle Management&lt;/h3&gt;

&lt;h4 id=&#34;ready&#34;&gt;Ready()&lt;/h4&gt;

&lt;p&gt;This tells Agones that the Game Server is ready to take player connections.
Once a Game Server has specified that it is &lt;code&gt;Ready&lt;/code&gt;, then the Kubernetes
GameServer record will be moved to the &lt;code&gt;Ready&lt;/code&gt; state, and the details
for its public address and connection port will be populated.&lt;/p&gt;

&lt;p&gt;While Agones prefers that &lt;code&gt;Shutdown()&lt;/code&gt; is run once a game has completed to delete the &lt;code&gt;GameServer&lt;/code&gt; instance,
if you want or need to move an &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServer&lt;/code&gt; back to &lt;code&gt;Ready&lt;/code&gt; to be reused, you can call this SDK method again to do
this.&lt;/p&gt;

&lt;h4 id=&#34;health&#34;&gt;Health()&lt;/h4&gt;

&lt;p&gt;This sends a single ping to designate that the Game Server is alive and
healthy. Failure to send pings within the configured thresholds will result
in the GameServer being marked as &lt;code&gt;Unhealthy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;See the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/examples/gameserver.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;gameserver.yaml&lt;/a&gt;
 for all health checking
configurations.&lt;/p&gt;

&lt;h4 id=&#34;reserve-seconds&#34;&gt;Reserve(seconds)&lt;/h4&gt;

&lt;p&gt;With some matchmaking scenarios and systems it is important to be able to ensure that a &lt;code&gt;GameServer&lt;/code&gt; is unable to be deleted,
but doesn&amp;rsquo;t trigger a FleetAutoscaler scale up. This is where &lt;code&gt;Reserve(seconds)&lt;/code&gt; is useful.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Reserve(seconds)&lt;/code&gt; will move the &lt;code&gt;GameServer&lt;/code&gt; into the Reserved state for the specified number of seconds (0 is forever), and then it will be
moved back to &lt;code&gt;Ready&lt;/code&gt; state. While in &lt;code&gt;Reserved&lt;/code&gt; state, the &lt;code&gt;GameServer&lt;/code&gt; will not be deleted on scale down or &lt;code&gt;Fleet&lt;/code&gt; update,
and also it could not be Allocated using &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;GameServerAllocation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is often used when a game server process must register itself with an external system, such as a matchmaker,
that requires it to designate itself as available for a game session for a certain period. Once a game session has started,
it should call &lt;code&gt;SDK.Allocate()&lt;/code&gt; to designate that players are currently active on it.&lt;/p&gt;

&lt;p&gt;Calling other state changing SDK commands such as &lt;code&gt;Ready&lt;/code&gt; or &lt;code&gt;Allocate&lt;/code&gt; will turn off the timer to reset the &lt;code&gt;GameServer&lt;/code&gt; back
to the &lt;code&gt;Ready&lt;/code&gt; state or to promote it to an &lt;code&gt;Allocated&lt;/code&gt; state accordingly.&lt;/p&gt;

&lt;h4 id=&#34;allocate&#34;&gt;Allocate()&lt;/h4&gt;

&lt;p&gt;With some matchmakers and game matching strategies, it can be important for game servers to mark themselves as &lt;code&gt;Allocated&lt;/code&gt;.
For those scenarios, this SDK functionality exists.&lt;/p&gt;

&lt;p&gt;There is a chance that GameServer does not actually become &lt;code&gt;Allocated&lt;/code&gt; after this call. Please refer to the general note in &lt;a href=&#34;#function-reference&#34;&gt;Function Reference&lt;/a&gt; above.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
Using a &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;GameServerAllocation&lt;/a&gt; is preferred in all other scenarios,
as it gives Agones control over how packed &lt;code&gt;GameServers&lt;/code&gt; are scheduled within a cluster, whereas with &lt;code&gt;Allocate()&lt;/code&gt; you
relinquish control to an external service which likely doesn&amp;rsquo;t have as much information as Agones.
&lt;/div&gt;


&lt;h4 id=&#34;shutdown&#34;&gt;Shutdown()&lt;/h4&gt;

&lt;p&gt;This tells Agones to shut down the currently running game server.
The GameServer state will be set &lt;code&gt;Shutdown&lt;/code&gt; and the
backing Pod will be deleted, if they have not shut themselves down already.&lt;/p&gt;

&lt;h3 id=&#34;configuration-retrieval&#34;&gt;Configuration Retrieval&lt;/h3&gt;

&lt;h4 id=&#34;gameserver&#34;&gt;GameServer()&lt;/h4&gt;

&lt;p&gt;This returns most of the backing GameServer configuration and Status. This can be useful
for instances where you may want to know Health check configuration, or the IP and Port
the GameServer is currently allocated to.&lt;/p&gt;

&lt;p&gt;Since the GameServer contains an entire &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates&#34;&gt;PodTemplate&lt;/a&gt;
the returned object is limited to that configuration that was deemed useful. If there are
areas that you feel are missing, please &lt;a href=&#34;https://github.com/googleforgames/agones/issues&#34;&gt;file an issue&lt;/a&gt; or pull request.&lt;/p&gt;

&lt;p&gt;The easiest way to see what is exposed, is to check
the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/proto/sdk/sdk.proto&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;&lt;code&gt;sdk.proto&lt;/code&gt;&lt;/a&gt;
, specifically at
the &lt;code&gt;message GameServer&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For language specific documentation, have a look at the respective source (linked above),
and the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
.&lt;/p&gt;

&lt;h4 id=&#34;watchgameserver-function-gameserver&#34;&gt;WatchGameServer(function(gameserver){&amp;hellip;})&lt;/h4&gt;

&lt;p&gt;This executes the passed in callback with the current &lt;code&gt;GameServer&lt;/code&gt; details whenever the underlying &lt;code&gt;GameServer&lt;/code&gt; configuration is updated.
This can be useful to track &lt;code&gt;GameServer &amp;gt; Status &amp;gt; State&lt;/code&gt; changes, &lt;code&gt;metadata&lt;/code&gt; changes, such as labels and annotations, and more.&lt;/p&gt;

&lt;p&gt;In combination with this SDK, manipulating &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/&#34;&gt;Annotations&lt;/a&gt; and
&lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/&#34;&gt;Labels&lt;/a&gt; can also be a useful way to communicate information through to running game server processes from outside those processes.
This is especially useful when combined with &lt;code&gt;GameServerAllocation&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;applied metadata&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since the GameServer contains an entire &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates&#34;&gt;PodTemplate&lt;/a&gt;
the returned object is limited to that configuration that was deemed useful. If there are
areas that you feel are missing, please &lt;a href=&#34;https://github.com/googleforgames/agones/issues&#34;&gt;file an issue&lt;/a&gt; or pull request.&lt;/p&gt;

&lt;p&gt;The easiest way to see what is exposed, is to check
the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/proto/sdk/sdk.proto&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;&lt;code&gt;sdk.proto&lt;/code&gt;&lt;/a&gt;
, specifically at
the &lt;code&gt;message GameServer&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For language specific documentation, have a look at the respective source (linked above),
and the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
.&lt;/p&gt;

&lt;h3 id=&#34;metadata-management&#34;&gt;Metadata Management&lt;/h3&gt;

&lt;h4 id=&#34;setlabel-key-value&#34;&gt;SetLabel(key, value)&lt;/h4&gt;

&lt;p&gt;This will set a &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/&#34;&gt;Label&lt;/a&gt; value on the backing &lt;code&gt;GameServer&lt;/code&gt;
record that is stored in Kubernetes. To maintain isolation, the &lt;code&gt;key&lt;/code&gt; value is automatically prefixed with &amp;ldquo;agones.dev/sdk-&amp;rdquo;&lt;/p&gt;



&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;
There are limits on the characters that be used for label keys and values. Details are &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set&#34;&gt;here&lt;/a&gt;.
&lt;/div&gt;


&lt;p&gt;This can be useful if you want information from your running game server process to be observable or searchable through the Kubernetes API.&lt;/p&gt;

&lt;h4 id=&#34;setannotation-key-value&#34;&gt;SetAnnotation(key, value)&lt;/h4&gt;

&lt;p&gt;This will set a &lt;a href=&#34;https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/&#34;&gt;Annotation&lt;/a&gt; value on the backing
&lt;code&gt;Gameserver&lt;/code&gt; record that is stored in Kubernetes. To maintain isolation, the &lt;code&gt;key&lt;/code&gt; value is automatically prefixed with &amp;ldquo;agones.dev/sdk-&amp;rdquo;&lt;/p&gt;

&lt;p&gt;This can be useful if you want information from your running game server process to be observable through the Kubernetes API.&lt;/p&gt;

&lt;h3 id=&#34;player-tracking&#34;&gt;Player Tracking&lt;/h3&gt;


&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
    &lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;
    &lt;p&gt;The Player Tracking feature is currently &lt;strong&gt;&lt;a href=&#34;/site/site/docs/guides/feature-stages/#alpha&#34;&gt;Alpha&lt;/a&gt;&lt;/strong&gt;,
        not enabled by default, and may change in the future.&lt;/p&gt;
    &lt;p&gt;Use the Feature Gate &lt;code&gt;PlayerTracking&lt;/code&gt; to enable and test this feature.&lt;/p&gt;
    &lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Gate documentation&lt;/a&gt; for details on how to enable features.&lt;/p&gt;
&lt;/div&gt;


&lt;h4 id=&#34;alpha-playerconnect-playerid&#34;&gt;Alpha().PlayerConnect(playerID)&lt;/h4&gt;

&lt;p&gt;This function increases the SDK’s stored player count by one, and appends this playerID to
&lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.PlayerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;&lt;/a&gt;
are then set to update the player count and id list a second from now,
unless there is already an update pending, in which case the update joins that batch operation.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PlayerConnect()&lt;/code&gt; returns true and adds the playerID to the list of playerIDs if this playerID was not already in the
list of connected playerIDs.&lt;/p&gt;

&lt;p&gt;If the playerID exists within the list of connected playerIDs, &lt;code&gt;PlayerConnect()&lt;/code&gt; will return false, and the list of
connected playerIDs will be left unchanged.&lt;/p&gt;

&lt;p&gt;An error will be returned if the playerID was not already in the list of connected playerIDs but the player capacity for
the server has been reached. The playerID will not be added to the list of playerIDs.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
Do not use this method if you are manually managing &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt;
through the Kubernetes API, as indeterminate results will occur.
&lt;/div&gt;


&lt;h4 id=&#34;alpha-playerdisconnect-playerid&#34;&gt;Alpha().PlayerDisconnect(playerID)&lt;/h4&gt;

&lt;p&gt;This function decreases the SDK’s stored player count by one, and removes the playerID from
&lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.PlayerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; are then set to
update the player count and id list a second from now,
unless there is already an update pending, in which case the update joins that batch operation.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PlayerDisconnect()&lt;/code&gt; will return true and remove the supplied playerID from the list of connected playerIDs if the
playerID value exists within the list.&lt;/p&gt;

&lt;p&gt;If the playerID was not in the list of connected playerIDs, the call will return false, and the connected playerID list
will be left unchanged.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
Do not use this method if you are manually managing &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; and &lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt;
through the Kubernetes API, as indeterminate results will occur.
&lt;/div&gt;


&lt;h4 id=&#34;alpha-setplayercapacity-count&#34;&gt;Alpha().SetPlayerCapacity(count)&lt;/h4&gt;

&lt;p&gt;Update the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/#agones.dev/v1.PlayerStatus&#34;&gt;&lt;code&gt;GameServer.Status.Players.Capacity&lt;/code&gt;&lt;/a&gt; value with a new capacity.&lt;/p&gt;

&lt;h4 id=&#34;alpha-getplayercapacity&#34;&gt;Alpha().GetPlayerCapacity()&lt;/h4&gt;

&lt;p&gt;This function retrieves the current player capacity. This is always accurate from what has been set through this SDK,
even if the value has yet to be updated on the GameServer status resource.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
If &lt;code&gt;GameServer.Status.Players.Capacity&lt;/code&gt; is set manually through the Kubernetes API, use &lt;code&gt;SDK.GameServer()&lt;/code&gt; or
&lt;code&gt;SDK.WatchGameServer()&lt;/code&gt; instead to view this value.
&lt;/div&gt;


&lt;h4 id=&#34;alpha-getplayercount&#34;&gt;Alpha().GetPlayerCount()&lt;/h4&gt;

&lt;p&gt;This function returns if the playerID is currently connected to the GameServer.
This is always accurate from what has been set through this SDK,
even if the value has yet to be updated on the GameServer status resource.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
If &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; is set manually through the Kubernetes API, use SDK.GameServer()
or SDK.WatchGameServer() instead to retrieve the current player count.
&lt;/div&gt;


&lt;h4 id=&#34;alpha-isplayerconnected-playerid&#34;&gt;Alpha().IsPlayerConnected(playerID)&lt;/h4&gt;

&lt;p&gt;This function returns if the playerID is currently connected to the GameServer. This is always accurate from what has
been set through this SDK,
even if the value has yet to be updated on the GameServer status resource.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
If &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; is set manually through the Kubernetes API, use SDK.GameServer()
or SDK.WatchGameServer() instead to determine connected status.
&lt;/div&gt;


&lt;h4 id=&#34;alpha-getconnectedplayers&#34;&gt;Alpha().GetConnectedPlayers()&lt;/h4&gt;

&lt;p&gt;This function returns the list of the currently connected player ids. This is always accurate from what has been set
through this SDK, even if the value has yet to be updated on the GameServer status resource.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
If &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt; is set manually through the Kubernetes API, use SDK.GameServer()
or SDK.WatchGameServer() instead to list the connected players.
&lt;/div&gt;


&lt;h2 id=&#34;writing-your-own-sdk&#34;&gt;Writing your own SDK&lt;/h2&gt;

&lt;p&gt;If there isn&amp;rsquo;t an SDK for the language and platform you are looking for, you have several options:&lt;/p&gt;

&lt;h3 id=&#34;grpc-client-generation&#34;&gt;gRPC Client Generation&lt;/h3&gt;

&lt;p&gt;If client generation is well supported by &lt;a href=&#34;https://grpc.io/docs/&#34;&gt;gRPC&lt;/a&gt;, then generate client(s) from
the proto files found in the
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/proto/sdk&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;&lt;code&gt;proto/sdk&lt;/code&gt;&lt;/a&gt;
,
directory and look at the current 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/sdks&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;sdks&lt;/a&gt;
 to see how the wrappers are
implemented to make interaction with the SDK server simpler for the user.&lt;/p&gt;

&lt;h3 id=&#34;rest-api-implementation&#34;&gt;REST API Implementation&lt;/h3&gt;

&lt;p&gt;If client generation is not well supported by gRPC, or if there are other complicating factors, implement the SDK through
the &lt;a href=&#34;/site/site/docs/guides/client-sdks/rest/&#34;&gt;REST&lt;/a&gt; HTTP+JSON interface. This could be written by hand, or potentially generated from
the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/sdks/swagger&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Swagger/OpenAPI Specifications&lt;/a&gt;
.&lt;/p&gt;

&lt;p&gt;Finally, if you build something that would be usable by the community, please submit a pull request!&lt;/p&gt;

&lt;h2 id=&#34;sdk-conformance-test&#34;&gt;SDK Conformance Test&lt;/h2&gt;

&lt;p&gt;There is a tool &lt;code&gt;SDK server Conformance&lt;/code&gt; checker which will run Local SDK server and record all requests your client is performing.&lt;/p&gt;

&lt;p&gt;In order to check that SDK is working properly you should write simple SDK test client which would use all methods of your SDK.&lt;/p&gt;

&lt;p&gt;Also to test that SDK client is receiving valid Gameserver data, your binary should set the same &lt;code&gt;Label&lt;/code&gt; value as creation timestamp which you will receive as a result of GameServer() call and &lt;code&gt;Annotation&lt;/code&gt; value same as gameserver UID received by Watch gameserver callback.&lt;/p&gt;

&lt;p&gt;Complete list of endpoints which should be called by your test client is the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ready,allocate,setlabel,setannotation,gameserver,health,shutdown,watch
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In order to run this test SDK server locally use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SECONDS=30 make run-sdk-conformance-local
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Docker container would timeout in 30 seconds and give your the comparison of received requests and expected requests&lt;/p&gt;

&lt;p&gt;For instance you could run Go SDK conformance test and see how the process goes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SDK_FOLDER=go make run-sdk-conformance-test
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In order to add test client for your SDK, write &lt;code&gt;sdktest.sh&lt;/code&gt; and &lt;code&gt;Dockerfile&lt;/code&gt;. Refer to 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/build/build-sdk-images/go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Golang SDK Conformance testing directory structure&lt;/a&gt;
.&lt;/p&gt;

&lt;h2 id=&#34;building-the-tools&#34;&gt;Building the Tools&lt;/h2&gt;

&lt;p&gt;If you wish to build the binaries from source
the &lt;code&gt;make&lt;/code&gt; target &lt;code&gt;build-agones-sdk-binary&lt;/code&gt; will compile the necessary binaries
for all supported operating systems (64 bit windows, linux and osx).&lt;/p&gt;

&lt;p&gt;You can find the binaries in the &lt;code&gt;bin&lt;/code&gt; folder in 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/cmd/sdk-server&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;`cmd/sdk-server`&lt;/a&gt;

once compilation is complete.&lt;/p&gt;

&lt;p&gt;See 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/build&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Developing, Testing and Building Agones&lt;/a&gt;
 for more details.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: GameServer Creation, Allocation and Shutdown Lifecycle</title>
      <link>/site/docs/guides/gameserver-lifecycle/</link>
      <pubDate>Fri, 01 Feb 2019 02:15:18 +0000</pubDate>
      
      <guid>/site/docs/guides/gameserver-lifecycle/</guid>
      <description>
        
        
        

&lt;h2 id=&#34;matchmaker-requests-a-gameserver-from-a-fleet&#34;&gt;Matchmaker requests a GameServer from a Fleet&lt;/h2&gt;

&lt;p&gt;This is the preferred workflow for a GameServer, in which an external matchmaker requests an allocation from one or more
&lt;code&gt;Fleets&lt;/code&gt; using a &lt;code&gt;GameServerAllocation&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;../../../diagrams/gameserver-lifecycle.puml.png&#34; alt=&#34;Allocated Lifecycle Sequence Diagram&#34; /&gt;&lt;/p&gt;

&lt;h2 id=&#34;matchmaker-requires-game-server-process-registration&#34;&gt;Matchmaker requires game server process registration&lt;/h2&gt;

&lt;p&gt;Scenarios in which a Matchmaker requires a game server process to register themselves with the matchmaker, and the
matchmaker decides which &lt;code&gt;GameServer&lt;/code&gt; players are sent to, this flow is common:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;../../../diagrams/gameserver-reserved.puml.png&#34; alt=&#34;Reserved Lifecycle Sequence Diagram&#34; /&gt;&lt;/p&gt;



&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;
This does relinquish control over how &lt;code&gt;GameServers&lt;/code&gt; are packed across the cluster to the external matchmaker. It is likely
  it will not do as good a job at packing and scaling as Agones.
&lt;/div&gt;


&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps:&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Read the various references, including the &lt;a href=&#34;/site/site/docs/reference/gameserver/&#34;&gt;GameServer&lt;/a&gt; and &lt;a href=&#34;/site/site/docs/reference/fleet/&#34;&gt;Fleet&lt;/a&gt; reference materials.&lt;/li&gt;
&lt;li&gt;Review the specifics of &lt;a href=&#34;/site/site/docs/guides/health-checking/&#34;&gt;Health Checking&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;See all the commands the &lt;a href=&#34;/site/site/docs/guides/client-sdks/&#34;&gt;Client SDK&lt;/a&gt; provides - we only show a few here!&lt;/li&gt;
&lt;li&gt;If you aren&amp;rsquo;t familiar with the term &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod/&#34;&gt;Pod&lt;/a&gt;, this should provide a reference.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Fleet Updates</title>
      <link>/site/docs/guides/fleet-updates/</link>
      <pubDate>Tue, 27 Aug 2019 03:58:19 +0000</pubDate>
      
      <guid>/site/docs/guides/fleet-updates/</guid>
      <description>
        
        
        

&lt;h2 id=&#34;rolling-update-strategy&#34;&gt;Rolling Update Strategy&lt;/h2&gt;

&lt;p&gt;When Fleets are edited and updated, the default strategy of Agones is to roll the new version of the &lt;code&gt;GameServer&lt;/code&gt;
out to the entire &lt;code&gt;Fleet&lt;/code&gt;, in a step by step increment and decrement by adding a chunk of the new version and removing
a chunk of the current set of &lt;code&gt;GameServers&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is done while ensuring that &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; are not deleted
until they are specifically shutdown through the game servers SDK, as they are expected to have players on them.&lt;/p&gt;

&lt;p&gt;You can see this in the &lt;code&gt;Fleet.Spec.Strategy&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/fleet/&#34;&gt;reference&lt;/a&gt;, with controls for how
much of the &lt;code&gt;Fleet&lt;/code&gt; is  incremented and decremented at one time:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;strategy&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;type&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;RollingUpdate&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;rollingUpdate&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;maxSurge&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;25&lt;/span&gt;%&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;maxUnavailable&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;25&lt;/span&gt;%&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So when a Fleet is edited (any field other than &lt;code&gt;replicas&lt;/code&gt;, see note below), either through &lt;code&gt;kubectl&lt;/code&gt; &lt;code&gt;edit&lt;/code&gt;/&lt;code&gt;apply&lt;/code&gt; or via the Kubernetes API, this performs the following operations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Adds the &lt;code&gt;maxSurge&lt;/code&gt; number of &lt;code&gt;GameServers&lt;/code&gt; to the Fleet.&lt;/li&gt;
&lt;li&gt;Shutdown the &lt;code&gt;maxUnavailable&lt;/code&gt; number of &lt;code&gt;GameServers&lt;/code&gt; in the Fleet, skipping &lt;code&gt;Allocated&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Repeat above steps until all the previous &lt;code&gt;GameServer&lt;/code&gt; configurations have been &lt;code&gt;Shutdown&lt;/code&gt; and deleted.&lt;/li&gt;
&lt;/ol&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
&lt;p&gt;When &lt;code&gt;Fleet&lt;/code&gt; update contains only changes to the &lt;code&gt;replicas&lt;/code&gt; parameter, then new GameServers will be created/deleted straight away,
which means in that case &lt;code&gt;maxSurge&lt;/code&gt; and &lt;code&gt;maxUnavailable&lt;/code&gt; parameters for a RollingUpdate will not be used.
The RollingUpdate strategy takes place when you update &lt;code&gt;spec&lt;/code&gt; parameters other than &lt;code&gt;replicas&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you are using a Fleet which is scaled by a FleetAutoscaler, &lt;a href=&#34;/site/site/docs/getting-started/create-fleetautoscaler/#7-change-autoscaling-parameters&#34;&gt;read the Fleetautoscaler guide&lt;/a&gt; for more details on how RollingUpdates with FleetAutoscalers need to be implemented.&lt;/p&gt;

&lt;p&gt;You could also check the behaviour of the Fleet with a RollingUpdate strategy on a test &lt;code&gt;Fleet&lt;/code&gt; to preview your upcoming updates.
Use &lt;code&gt;kubectl describe fleet&lt;/code&gt; to track scaling events in a Fleet.&lt;/p&gt;

&lt;/div&gt;


&lt;h2 id=&#34;recreate-strategy&#34;&gt;Recreate Strategy&lt;/h2&gt;

&lt;p&gt;This is an optimal &lt;code&gt;Fleet&lt;/code&gt; update strategy if you want to replace all &lt;code&gt;GameServers&lt;/code&gt; that are not &lt;code&gt;Allocated&lt;/code&gt;
with a new version as quickly as possible.&lt;/p&gt;

&lt;p&gt;You can see this in the &lt;code&gt;Fleet.Spec.Strategy&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/fleet/&#34;&gt;reference&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;strategy&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;type&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;Recreate&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So when a Fleet is edited, either through &lt;code&gt;kubectl&lt;/code&gt; &lt;code&gt;edit&lt;/code&gt;/&lt;code&gt;apply&lt;/code&gt; or via the Kubernetes API, this performs the following operations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Shutdown&lt;/code&gt; all &lt;code&gt;GameServers&lt;/code&gt; in the Fleet that are not currently &lt;code&gt;Allocated&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Create the same number of the new version of the &lt;code&gt;GameServers&lt;/code&gt; that were previously deleted.&lt;/li&gt;
&lt;li&gt;Repeat above steps until all the previous &lt;code&gt;GameServer&lt;/code&gt; configurations have been &lt;code&gt;Shutdown&lt;/code&gt; and deleted.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&#34;two-or-more-fleets-strategy&#34;&gt;Two (or more) Fleets Strategy&lt;/h2&gt;

&lt;p&gt;If you want very fine-grained control over the rate that new versions of a &lt;code&gt;GameServer&lt;/code&gt; configuration is rolled out, or
if you want to do some version of A/B testing or smoke test between different versions, running two (or more) &lt;code&gt;Fleets&lt;/code&gt; at the same time is a
good solution for this.&lt;/p&gt;

&lt;p&gt;To do this, create a second &lt;code&gt;Fleet&lt;/code&gt; inside your cluster, starting with zero replicas. From there you can scale this newer &lt;code&gt;Fleet&lt;/code&gt;
up and the older &lt;code&gt;Fleet&lt;/code&gt; down as required by your specific rollout strategy.&lt;/p&gt;

&lt;p&gt;This also allows you to rollback if issues arise with the newer version, as you can delete the newer &lt;code&gt;Fleet&lt;/code&gt;
and scale up the old Fleet to its previous levels, resulting in minimal impact to the players.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
For GameServerAllocation, you will need to have at least a single shared label between the &lt;code&gt;GameServers&lt;/code&gt; in each
Fleet.
&lt;/div&gt;


&lt;h3 id=&#34;gameserverallocation-across-fleets&#34;&gt;GameServerAllocation Across Fleets&lt;/h3&gt;

&lt;p&gt;Since &lt;code&gt;GameServerAllocation&lt;/code&gt; is powered by label selectors, it is possible to allocate across multiple fleets, and/or
give preference to particular sets of &lt;code&gt;GameServers&lt;/code&gt; over others. You can see details of this in
the &lt;code&gt;GameServerAllocation&lt;/code&gt; &lt;a href=&#34;/site/site/docs/reference/gameserverallocation/&#34;&gt;reference&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In a scenario where a new &lt;code&gt;v2&lt;/code&gt; version of a &lt;code&gt;Fleet&lt;/code&gt; is being slowly scaled up in a separate Fleet from the previous &lt;code&gt;v1&lt;/code&gt;
Fleet, we can specify that we &lt;code&gt;prefer&lt;/code&gt; allocation to occur from the &lt;code&gt;v2&lt;/code&gt; Fleet, and if none are available, fallback to
the &lt;code&gt;v1&lt;/code&gt; Fleet, like so:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;apiVersion&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;allocation.agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;kind&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;GameServerAllocation&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;spec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;required&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;matchLabels&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;game&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;my-awesome-game&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;preferred&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;matchLabels&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;agones.dev/fleet&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;v2&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In this example, all &lt;code&gt;GameServers&lt;/code&gt; have the label &lt;code&gt;game: my-awesome-game&lt;/code&gt;, so the Allocation will search across both
Fleets through that mechanism. The &lt;code&gt;preferred&lt;/code&gt; label matching selector tells the allocation system to first search
all &lt;code&gt;GameServers&lt;/code&gt; with the &lt;code&gt;v2&lt;/code&gt; &lt;code&gt;Fleet&lt;/code&gt; label, and if not found, search through the rest of the set.&lt;/p&gt;

&lt;p&gt;The above &lt;code&gt;GameServerAllocation&lt;/code&gt; can then be used while you scale up the &lt;code&gt;v2&lt;/code&gt; Fleet and scale down the original Fleet at
the rate that you deem fit for your specific rollout.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: GameServer Health Checking</title>
      <link>/site/docs/guides/health-checking/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:19 +0000</pubDate>
      
      <guid>/site/docs/guides/health-checking/</guid>
      <description>
        
        
        

&lt;h2 id=&#34;disabling-health-checking&#34;&gt;Disabling Health Checking&lt;/h2&gt;

&lt;p&gt;By default, health checking is enabled, but it can be turned off by setting the &lt;code&gt;spec.health.disabled&lt;/code&gt; property to
true.&lt;/p&gt;

&lt;h2 id=&#34;sdk-api&#34;&gt;SDK API&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Health()&lt;/code&gt; function on the &lt;a href=&#34;/site/site/docs/guides/client-sdks/&#34;&gt;SDK object&lt;/a&gt; needs to be called at an
interval less than the &lt;code&gt;spec.health.periodSeconds&lt;/code&gt;
threshold time to be considered before it will be considered a &lt;code&gt;failure&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The health check will also need to have not been called a consecutive number of times (&lt;code&gt;spec.health.failureTheshold&lt;/code&gt;),
giving it a chance to heal if it there is an issue.&lt;/p&gt;

&lt;h2 id=&#34;health-failure-strategy&#34;&gt;Health Failure Strategy&lt;/h2&gt;

&lt;p&gt;The following is the process for what happens to a &lt;code&gt;GameServer&lt;/code&gt; when it is unhealthy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If the &lt;code&gt;GameServer&lt;/code&gt; container exits with an error before the &lt;code&gt;GameServer&lt;/code&gt; moves to &lt;code&gt;Ready&lt;/code&gt; then,
it is restarted as per the &lt;code&gt;restartPolicy&lt;/code&gt; (which defaults to &amp;ldquo;Always&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;If the &lt;code&gt;GameServer&lt;/code&gt; fails health checking at any point, then it doesn&amp;rsquo;t restart,
but moves to an &lt;code&gt;Unhealthy&lt;/code&gt; state.&lt;/li&gt;
&lt;li&gt;If the &lt;code&gt;GameServer&lt;/code&gt; container exits while in &lt;code&gt;Ready&lt;/code&gt;, &lt;code&gt;Allocated&lt;/code&gt; or &lt;code&gt;Reserved&lt;/code&gt; state, it will be restarted
as per the &lt;code&gt;restartPolicy&lt;/code&gt;  (which defaults to &amp;ldquo;Always&amp;rdquo;, since &lt;code&gt;RestartPolicy&lt;/code&gt; is a &lt;code&gt;Pod&lt;/code&gt; wide setting),
but will immediately move to an &lt;code&gt;Unhealthy&lt;/code&gt; state.&lt;/li&gt;
&lt;li&gt;If the SDK sidecar fails, then it will be restarted, assuming the &lt;code&gt;RestartPolicy&lt;/code&gt; is Always/OnFailure.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&#34;fleet-management-of-unhealthy-gameservers&#34;&gt;Fleet Management of Unhealthy GameServers&lt;/h2&gt;

&lt;p&gt;If a &lt;code&gt;GameServer&lt;/code&gt; moves into an &lt;code&gt;Unhealthy&lt;/code&gt; state when it is not part of a Fleet, the &lt;code&gt;GameServer&lt;/code&gt; will remain in the
Unhealthy state until explicitly deleted.  This is useful for debugging &lt;code&gt;Unhealthy&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt;, or if you are
creating your own &lt;code&gt;GameServer&lt;/code&gt; management layer, you can explicitly choose what to do if a &lt;code&gt;GameServer&lt;/code&gt; becomes
&lt;code&gt;Unhealthy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If a &lt;code&gt;GameServer&lt;/code&gt; is part of a &lt;code&gt;Fleet&lt;/code&gt;, the &lt;code&gt;Fleet&lt;/code&gt; management system will &lt;em&gt;delete&lt;/em&gt; any &lt;code&gt;Unhealthy&lt;/code&gt; &lt;code&gt;GameServers&lt;/code&gt; and
immediately replace them with a brand new &lt;code&gt;GameServer&lt;/code&gt; to ensure it has the configured number of Replicas.&lt;/p&gt;

&lt;h2 id=&#34;configuration-reference&#34;&gt;Configuration Reference&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Health checking for the running game server&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;health&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Disable health checking. defaults to false, but can be set to true&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;disabled&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Number of seconds after the container has started before health check is initiated. Defaults to 5 seconds&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;initialDelaySeconds&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# If the `Health()` function doesn&amp;#39;t get called at least once every period (seconds), then&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# the game server is not healthy. Defaults to 5&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;periodSeconds&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Minimum consecutive failures for the health probe to be considered failed after having succeeded.&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Defaults to 3. Minimum value is 1&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;failureThreshold&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;See the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/examples/gameserver.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;full GameServer example&lt;/a&gt;
 for more details&lt;/p&gt;

&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;

&lt;h3 id=&#34;c&#34;&gt;C++&lt;/h3&gt;

&lt;p&gt;For a configuration that requires a health ping every 5 seconds, the example below sends a request every 2 seconds
to be sure that the GameServer is under the threshold.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-cpp&#34; data-lang=&#34;cpp&#34;&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;void&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;doHealth&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;agones&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;SDK&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;while&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Health&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;())&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
            &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;cout&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Health ping failed&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;endl&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;else&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
            &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;cout&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Health ping sent&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;endl&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
        &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
        &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;this_thread&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sleep_for&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;chrono&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;seconds&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;));&lt;/span&gt;
    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;

&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;int&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
    &lt;span style=&#34;color:#000&#34;&gt;agones&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;SDK&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;new&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;agones&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;SDK&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;();&lt;/span&gt;
    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;bool&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;connected&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Connect&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;();&lt;/span&gt;
    &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;connected&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
        &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;;&lt;/span&gt;
    &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
    &lt;span style=&#34;color:#000&#34;&gt;std&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;::&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;thread&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;health&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;doHealth&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;sdk&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;);&lt;/span&gt;

    &lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// ...  run the game server code
&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;
&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&#34;full-game-server&#34;&gt;Full Game Server&lt;/h3&gt;

&lt;p&gt;Also look in the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/examples&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;examples&lt;/a&gt;
 directory.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Player Tracking</title>
      <link>/site/docs/guides/player-tracking/</link>
      <pubDate>Tue, 19 May 2020 00:00:00 +0000</pubDate>
      
      <guid>/site/docs/guides/player-tracking/</guid>
      <description>
        
        
        


&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
    &lt;h4 class=&#34;alert-heading&#34;&gt;Warning&lt;/h4&gt;
    &lt;p&gt;The Player Tracking feature is currently &lt;strong&gt;&lt;a href=&#34;/site/site/docs/guides/feature-stages/#alpha&#34;&gt;Alpha&lt;/a&gt;&lt;/strong&gt;,
        not enabled by default, and may change in the future.&lt;/p&gt;
    &lt;p&gt;Use the Feature Gate &lt;code&gt;PlayerTracking&lt;/code&gt; to enable and test this feature.&lt;/p&gt;
    &lt;p&gt;See the &lt;a href=&#34;/site/site/docs/guides/feature-stages/#feature-gates&#34;&gt;Feature Gate documentation&lt;/a&gt; for details on how to enable features.&lt;/p&gt;
&lt;/div&gt;


&lt;h2 id=&#34;managing-gameserver-capacities&#34;&gt;Managing GameServer Capacities&lt;/h2&gt;

&lt;p&gt;To track your &lt;code&gt;GameServer&lt;/code&gt; current player capacity, Agones gives you the ability to both set an initial capacity at
&lt;code&gt;GameServer&lt;/code&gt; creation, as well be able to change it during the lifecycle of the &lt;code&gt;GameServer&lt;/code&gt; through the Agones SDK.&lt;/p&gt;

&lt;p&gt;To set the initial capacity, you can do so via &lt;code&gt;GameServer.Spec.Players.InitialCapacity&lt;/code&gt; like so:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;apiVersion&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;kind&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;GameServer&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;metadata&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gs-example&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;spec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# ...&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;players&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# set this GameServer&amp;#39;s initial player capacity to 10&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;initialCapacity&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;10&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;From there, if you need to change the capacity of the GameSever as gameplay is in progress, you can also do so via
&lt;a href=&#34;/site/site/docs/guides/client-sdks/#alpha-setplayercapacity-count&#34;&gt;&lt;code&gt;SDK.Alpha().SetPlayerCapacity(count)&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The current player capacity is represented in &lt;code&gt;GameServer.Status.Players.Capacity&lt;/code&gt; resource value.&lt;/p&gt;

&lt;p&gt;We can see this in action, when we look at the Status section of a GameServer resource
, wherein the capacity has been set to 20:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
Status:
  Address:    14.81.195.72
  Node Name:  gke-test-cluster-default-6cd0ba67-1mps
  Players:
    Capacity:  20
    Count:     0
    Ids:       &amp;lt;nil&amp;gt;
  Ports:
    Name:          gameport
    Port:          7983
  Reserved Until:  &amp;lt;nil&amp;gt;
  State:           Ready
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;From the SDK, the game server binary can also retrieve the current player capacity
via &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alpha-getplayercapacity&#34;&gt;&lt;code&gt;SDK.Alpha().GetPlayerCapacity()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
&lt;p&gt;Changing the capacity value here has no impact on players actually
connected to or trying to connect to your server, as that is not a responsibility of Agones.&lt;/p&gt;

&lt;p&gt;This functionality is for tracking purposes only.&lt;/p&gt;

&lt;/div&gt;


&lt;h2 id=&#34;connecting-and-disconnecting-players&#34;&gt;Connecting and Disconnecting Players&lt;/h2&gt;

&lt;p&gt;As players connect and disconnect from your game, the Player Tracking functions enable you to track which players
are currently connected.&lt;/p&gt;

&lt;p&gt;It assumed that each player that connects has a unique token that identifies them as a player.&lt;/p&gt;

&lt;p&gt;When a player connects to the game server binary,
calling &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alpha-playerconnect-playerid&#34;&gt;&lt;code&gt;SDK.Alpha().PlayerConnect(playerID)&lt;/code&gt;&lt;/a&gt;
with the unique player token will register them as connected, and store their player id.&lt;/p&gt;

&lt;p&gt;At disconnection time,
call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alpha-playerdisconnect-playerid&#34;&gt;&lt;code&gt;SDK.Alpha().PlayerDisconnect(playerID)&lt;/code&gt;&lt;/a&gt;
, which will deregister them and remove their player id from the list.&lt;/p&gt;

&lt;p&gt;Each of these &lt;code&gt;playerIDs&lt;/code&gt; is stored on &lt;code&gt;GameServer.Status.Players.IDs&lt;/code&gt;, and the current count of connected players
can be seen in &lt;code&gt;GameServer.Status.Players.Count&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can see this in action below in the &lt;code&gt;GameServer&lt;/code&gt; Status section, where there are 4 players connected:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;...
Status:
  Address:    39.82.196.74
  Node Name:  gke-test-cluster-default-6cd0ba77-1mps
  Players:
    Capacity:  10
    Count:     4
    Ids:
      xy8a
      m0ux
      71nj
      lpq5
  Ports:
    Name:          gameport
    Port:          7166
  Reserved Until:  &amp;lt;nil&amp;gt;
  State:           Ready
&lt;/code&gt;&lt;/pre&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
&lt;p&gt;Calling &lt;code&gt;PlayerConnect&lt;/code&gt; or &lt;code&gt;PlayerDisconnect&lt;/code&gt; functions will not
connect or disconnect players, as that is not under the control of Agones.&lt;/p&gt;

&lt;p&gt;This functionality is for tracking purposes only.&lt;/p&gt;

&lt;/div&gt;


&lt;h2 id=&#34;checking-player-data&#34;&gt;Checking Player Data&lt;/h2&gt;

&lt;p&gt;Not only is the connected player data stored on the &lt;code&gt;GameServer&lt;/code&gt; resource, it is also stored in memory within the
SDK, so that it can be used from within the game server binary as a realtime, thread safe, registry of connected
players.&lt;/p&gt;

&lt;p&gt;Therefore, if you want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get the current player count, call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alpha-getplayercount&#34;&gt;&lt;code&gt;SDK.Alpha().GetPlayerCount()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Check if a specific player is connected, call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alpha-isplayerconnected-playerid&#34;&gt;&lt;code&gt;SDK.Alpha().IsPlayerConnected(playerID)&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Retrieve the full list of connected players, call &lt;a href=&#34;/site/site/docs/guides/client-sdks/#alpha-getconnectedplayers&#34;&gt;&lt;code&gt;SDK.Alpha().GetConnectedPlayers()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Review the &lt;a href=&#34;/site/site/docs/guides/client-sdks/#player-tracking&#34;&gt;Player Tracking SDK Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Local Game Server</title>
      <link>/site/docs/guides/local-game-server/</link>
      <pubDate>Tue, 19 Feb 2019 08:00:00 +0000</pubDate>
      
      <guid>/site/docs/guides/local-game-server/</guid>
      <description>
        
        
        

&lt;p&gt;You can register a local game server with Agones. This means you can run an experimental build of your game server in the Agones environment without the need of packaging and deploying it to a fleet. This allows you to quickly iterate on your game server code while still being able to plugin to your Agones environment.&lt;/p&gt;

&lt;h2 id=&#34;register-your-server-with-agones&#34;&gt;Register your server with Agones&lt;/h2&gt;

&lt;p&gt;To register your local game server you&amp;rsquo;ll need to know the IP address of the machine running it and the port. With that you&amp;rsquo;ll create a game server config like the one below.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;apiVersion&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;kind&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;GameServer&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;metadata&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;my-local-server&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;annotations&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Causes Agones to register your local game server at 192.1.1.2, replace with your server&amp;#39;s IP address.&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;agones.dev/dev-address&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;192.1.1.2&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;spec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;ports&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;default&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;portPolicy&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;Static&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;hostPort&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;17654&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;containerPort&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;17654&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# The following is ignored but required due to validation.&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;template&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;spec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;containers&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;simple-udp&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;image&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;gcr.io/agones-images/udp-server&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0.21&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once you save this to a file make sure you have &lt;code&gt;kubectl&lt;/code&gt; configured to point to your Agones cluster and then run &lt;code&gt;kubectl apply -f dev-gameserver.yaml&lt;/code&gt;. This will register your server with Agones.&lt;/p&gt;

&lt;p&gt;Local Game Servers has a few limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PortPolicy must be &lt;code&gt;Static&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The game server is not managed by Agones. Features like autoscaling, replication, etc are not available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you are finished working with your server, you can remove the registration with &lt;code&gt;kubectl delete -f dev-gameserver.yaml&lt;/code&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Latency Testing with Multiple Clusters</title>
      <link>/site/docs/guides/ping-service/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:30 +0000</pubDate>
      
      <guid>/site/docs/guides/ping-service/</guid>
      <description>
        
        
        

&lt;p&gt;To make latency testing easier, Agones installs with a simple ping service with both HTTP and UDP services that can be called
  for the purpose of timing how long the roundtrip takes for information to be returned from either of these services.&lt;/p&gt;

&lt;h2 id=&#34;installing&#34;&gt;Installing&lt;/h2&gt;

&lt;p&gt;By default, Agones installs &lt;a href=&#34;https://kubernetes.io/docs/concepts/services-networking/service/&#34;&gt;Kubernetes Services&lt;/a&gt; for
both HTTP and the UDP ping endpoints. These can be disabled entirely,
or disabled individually. See the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;Helm install guide&lt;/a&gt; for the parameters to
 pass through,
as well as configuration options.&lt;/p&gt;

&lt;p&gt;The ping services as all installed under the &lt;code&gt;agones-system&lt;/code&gt; namespace.&lt;/p&gt;

&lt;h2 id=&#34;http-service&#34;&gt;HTTP Service&lt;/h2&gt;

&lt;p&gt;This exposes an endpoint that returns a simple text HTTP response on request to the root &amp;ldquo;/&amp;rdquo; path. By default this is &lt;code&gt;ok&lt;/code&gt;, but
it can be configured via the &lt;code&gt;agones.ping.http.response&lt;/code&gt; parameter.&lt;/p&gt;

&lt;p&gt;This could be useful for providing clusters
with unique lookup names, such that clients are able to identify clusters from their responses.&lt;/p&gt;

&lt;p&gt;To lookup the details of this service, run &lt;code&gt;kubectl describe service agones-ping-http-service --namespace=agones-system&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&#34;udp-service&#34;&gt;UDP Service&lt;/h2&gt;

&lt;p&gt;The UDP ping service is a rate limited UDP echo service that returns the udp packet that it receives to its designated
sender.&lt;/p&gt;

&lt;p&gt;Since UDP sender details can be spoofed, this service is rate limited to 20 requests per second,
per sender address, per running instance (default is 2).&lt;/p&gt;

&lt;p&gt;This rate limit can be raised or lowered via the Helm install parameter &lt;code&gt;agones.ping.udp.rateLimit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;UDP packets are also limited to 1024 bytes in size.&lt;/p&gt;

&lt;p&gt;To lookup the details of this service, run &lt;code&gt;kubectl describe service agones-ping-udp-service --namespace=agones-system&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&#34;client-side-tooling&#34;&gt;Client side tooling&lt;/h2&gt;

&lt;p&gt;We deliberately didn&amp;rsquo;t provide any game client libraries, as all major languages and engines have capabilities
to send HTTP requests as well as UDP packets.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Metrics</title>
      <link>/site/docs/guides/metrics/</link>
      <pubDate>Thu, 03 Jan 2019 03:58:19 +0000</pubDate>
      
      <guid>/site/docs/guides/metrics/</guid>
      <description>
        
        
        

&lt;p&gt;Agones controller exposes metrics via &lt;a href=&#34;https://opencensus.io/&#34;&gt;OpenCensus&lt;/a&gt;. OpenCensus is a single distribution of libraries that collect metrics and distributed traces from your services, we only use it for metrics but it will allow us to support multiple exporters in the future.&lt;/p&gt;

&lt;p&gt;We choose to start with &lt;a href=&#34;https://prometheus.io/&#34;&gt;Prometheus&lt;/a&gt; as this is the most popular with Kubernetes but it is also compatible with Stackdriver.
If you need another exporter, check the &lt;a href=&#34;https://opencensus.io/exporters/supported-exporters/go/&#34;&gt;list of supported&lt;/a&gt; exporters. It should be pretty straightforward to register a new one. (GitHub PRs are more than welcome.)&lt;/p&gt;

&lt;p&gt;We plan to support multiple exporters in the future via environment variables and helm flags.&lt;/p&gt;

&lt;h2 id=&#34;backend-integrations&#34;&gt;Backend integrations&lt;/h2&gt;

&lt;h3 id=&#34;prometheus&#34;&gt;Prometheus&lt;/h3&gt;

&lt;p&gt;If you are running a &lt;a href=&#34;https://prometheus.io/&#34;&gt;Prometheus&lt;/a&gt; instance you just need to ensure that metrics and kubernetes service discovery are enabled. (helm chart values &lt;code&gt;agones.metrics.prometheusEnabled&lt;/code&gt; and &lt;code&gt;agones.metrics.prometheusServiceDiscovery&lt;/code&gt;). This will automatically add annotations required by Prometheus to discover Agones metrics and start collecting them. (see &lt;a href=&#34;https://github.com/prometheus/prometheus/tree/master/documentation/examples/kubernetes-rabbitmq&#34;&gt;example&lt;/a&gt;)&lt;/p&gt;

&lt;h3 id=&#34;prometheus-operator&#34;&gt;Prometheus Operator&lt;/h3&gt;

&lt;p&gt;If you have &lt;a href=&#34;https://github.com/coreos/prometheus-operator&#34;&gt;Prometheus operator&lt;/a&gt; installed in your cluster, make sure to add a &lt;a href=&#34;https://github.com/coreos/prometheus-operator/blob/v0.17.0/Documentation/api.md#servicemonitorspec&#34;&gt;&lt;code&gt;ServiceMonitor&lt;/code&gt;&lt;/a&gt; to discover Agones metrics as shown below:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;apiVersion&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;monitoring.coreos.com/v1&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;kind&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;ServiceMonitor&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;metadata&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;agones&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;labels&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;app&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;agones&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;spec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;selector&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;matchLabels&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;agones.dev/role&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;controller&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;endpoints&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;port&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;web&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Finally include that &lt;code&gt;ServiceMonitor&lt;/code&gt; in your &lt;a href=&#34;https://github.com/coreos/prometheus-operator/blob/v0.17.0/Documentation/user-guides/getting-started.md#include-servicemonitors&#34;&gt;Prometheus instance CRD&lt;/a&gt;, this is usually done by adding a label to the &lt;code&gt;ServiceMonitor&lt;/code&gt; above that is matched by the prometheus instance of your choice.&lt;/p&gt;

&lt;h3 id=&#34;stackdriver&#34;&gt;Stackdriver&lt;/h3&gt;

&lt;p&gt;We support the &lt;a href=&#34;https://opencensus.io/exporters/supported-exporters/go/stackdriver/&#34;&gt;OpenCensus Stackdriver exporter&lt;/a&gt;.
In order to use it you should enable &lt;a href=&#34;https://cloud.google.com/monitoring/api/enable-api&#34;&gt;Stackdriver Monitoring API&lt;/a&gt; in Google Cloud Console.
Follow the &lt;a href=&#34;#stackdriver-installation&#34;&gt;Stackdriver Installation steps&lt;/a&gt; to see your metrics on Stackdriver Monitoring website.&lt;/p&gt;

&lt;h2 id=&#34;metrics-available&#34;&gt;Metrics available&lt;/h2&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;agones_gameservers_count&lt;/td&gt;
&lt;td&gt;The number of gameservers per fleet and status&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_gameserver_allocations_duration_seconds&lt;/td&gt;
&lt;td&gt;The distribution of gameserver allocation requests latencies&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_gameservers_total&lt;/td&gt;
&lt;td&gt;The total of gameservers per fleet and status&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_fleets_replicas_count&lt;/td&gt;
&lt;td&gt;The number of replicas per fleet (total, desired, ready, allocated)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_able_to_scale&lt;/td&gt;
&lt;td&gt;The fleet autoscaler can access the fleet to scale&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_buffer_limits&lt;/td&gt;
&lt;td&gt;The limits of buffer based fleet autoscalers (min, max)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_buffer_size&lt;/td&gt;
&lt;td&gt;The buffer size of fleet autoscalers (count or percentage)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_current_replicas_count&lt;/td&gt;
&lt;td&gt;The current replicas count as seen by autoscalers&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_desired_replicas_count&lt;/td&gt;
&lt;td&gt;The desired replicas count as seen by autoscalers&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_fleet_autoscalers_limited&lt;/td&gt;
&lt;td&gt;The fleet autoscaler is capped (1)&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_gameservers_node_count&lt;/td&gt;
&lt;td&gt;The distribution of gameservers per node&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_nodes_count&lt;/td&gt;
&lt;td&gt;The count of nodes empty and with gameservers&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_http_request_total&lt;/td&gt;
&lt;td&gt;The total of HTTP requests to the Kubernetes API by status code&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_http_request_duration_seconds&lt;/td&gt;
&lt;td&gt;The distribution of HTTP requests latencies to the Kubernetes API by status code&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_list_total&lt;/td&gt;
&lt;td&gt;The total number of list operations for client-go caches&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_list_duration_seconds&lt;/td&gt;
&lt;td&gt;Duration of a Kubernetes list API call in seconds&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_list_items&lt;/td&gt;
&lt;td&gt;Count of items in a list from the Kubernetes API&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_watches_total&lt;/td&gt;
&lt;td&gt;The total number of watch operations for client-go caches&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_cache_last_resource_version&lt;/td&gt;
&lt;td&gt;Last resource version from the Kubernetes API&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_depth&lt;/td&gt;
&lt;td&gt;Current depth of the work queue&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_latency_seconds&lt;/td&gt;
&lt;td&gt;How long an item stays in the work queue&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_items_total&lt;/td&gt;
&lt;td&gt;Total number of items added to the work queue&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_work_duration_seconds&lt;/td&gt;
&lt;td&gt;How long processing an item from the work queue takes&lt;/td&gt;
&lt;td&gt;histogram&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_retries_total&lt;/td&gt;
&lt;td&gt;Total number of items retried to the work queue&lt;/td&gt;
&lt;td&gt;counter&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_longest_running_processor&lt;/td&gt;
&lt;td&gt;How long the longest running workqueue processor has been running in microseconds&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td&gt;agones_k8s_client_workqueue_unfinished_work_seconds&lt;/td&gt;
&lt;td&gt;How long unfinished work has been sitting in the workqueue in seconds&lt;/td&gt;
&lt;td&gt;gauge&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&#34;dashboard&#34;&gt;Dashboard&lt;/h2&gt;

&lt;h3 id=&#34;grafana-dashboards&#34;&gt;Grafana Dashboards&lt;/h3&gt;

&lt;p&gt;We provide a set of useful &lt;a href=&#34;https://grafana.com/&#34;&gt;Grafana&lt;/a&gt; dashboards to monitor Agones workload, they are located under the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;grafana folder&lt;/a&gt;
:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-autoscalers.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Autoscalers&lt;/a&gt;
 allows you to monitor your current autoscalers replicas request as well as fleet replicas allocation and readyness statuses. You can only select one autoscaler at the time using the provided dropdown.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-gameservers.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones GameServers&lt;/a&gt;
 displays your current game servers workload status (allocations, game servers statuses, fleets replicas) with optional fleet name filtering.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-allocations.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones GameServer Allocations&lt;/a&gt;
 displays Agones gameservers allocations rates and counts per fleet.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-allocator-usage.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Allocator Resource&lt;/a&gt;
 displays Agones Allocators CPU, memory usage and also some useful Golang runtime metrics.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-status.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Status&lt;/a&gt;
 displays Agones controller health status.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-controller-usage.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller Resource Usage&lt;/a&gt;
 displays Agones Controller CPU and memory usage and also some Golang runtime metrics.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-goclient-requests.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller go-client requests&lt;/a&gt;
 displays Agones Controller Kubernetes API consumption.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-goclient-caches.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller go-client caches&lt;/a&gt;
 displays Agones Controller Kubernetes Watches/Lists operations used.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-goclient-workqueues.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller go-client workqueues&lt;/a&gt;
 displays Agones Controller workqueue processing time and rates.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana/dashboard-apiserver-requests.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Agones Controller API Server requests&lt;/a&gt;
 displays your current API server request rate, errors rate and request latencies with optional CustomResourceDefinition filtering by Types: fleets, gameserversets, gameservers, gameserverallocations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dashboard screenshots :&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;../../../images/grafana-dashboard-autoscalers.png&#34; alt=&#34;grafana dashboard autoscalers&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;../../../images/grafana-dashboard-controller.png&#34; alt=&#34;grafana dashboard controller&#34; /&gt;&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
You can import our dashboards by copying the json content from
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/grafana&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;each config map&lt;/a&gt;
 into your own instance of Grafana (+ &amp;gt; Create &amp;gt; Import &amp;gt; Or paste json) or follow the &lt;a href=&#34;#installation&#34;&gt;installation&lt;/a&gt; guide.
&lt;/div&gt;


&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;

&lt;p&gt;When operating a live multiplayer game you will need to observe performances, resource usage and availability to learn more about your system. This guide will explain how you can setup Prometheus and Grafana into your own Kubernetes cluster to monitor your Agones workload.&lt;/p&gt;

&lt;p&gt;Before attemping this guide you should make sure you have &lt;a href=&#34;https://kubernetes.io/docs/tasks/tools/install-kubectl/&#34;&gt;kubectl&lt;/a&gt; and &lt;a href=&#34;https://docs.helm.sh/using_helm/&#34;&gt;helm&lt;/a&gt; installed and configured to reach your kubernetes cluster.&lt;/p&gt;

&lt;h3 id=&#34;prometheus-installation&#34;&gt;Prometheus installation&lt;/h3&gt;

&lt;p&gt;Prometheus is an open source monitoring solution, we will use it to store Agones controller metrics and query back the data.&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s install Prometheus using the &lt;a href=&#34;https://github.com/helm/charts/tree/master/stable/prometheus&#34;&gt;helm stable&lt;/a&gt; repository.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;helm upgrade --install --wait prom stable/prometheus --namespace metrics &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --set server.global.scrape_interval&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;30s &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --set server.persistentVolume.enabled&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#204a87&#34;&gt;true&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --set server.persistentVolume.size&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;64Gi &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    -f ./build/prometheus.yaml&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
You can also run our
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/Makefile&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Makefile&lt;/a&gt;
 target &lt;code&gt;make setup-prometheus&lt;/code&gt;
or &lt;code&gt;make kind-setup-prometheus&lt;/code&gt; and &lt;code&gt;make minikube-setup-prometheus&lt;/code&gt;
for
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/README.md#running-a-test-kind-cluster&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Kind&lt;/a&gt;
 and
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/README.md#running-a-test-minikube-cluster&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Minikube&lt;/a&gt;
.
&lt;/div&gt;


&lt;p&gt;For resiliency it is recommended to run Prometheus on a dedicated node which is separate from nodes where Game Servers
are scheduled. If you use the above command, with our 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/prometheus.yaml&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;prometheus.yaml&lt;/a&gt;
 to set up Prometheus, it will schedule Prometheus pods on nodes
tainted with &lt;code&gt;agones.dev/agones-metrics=true:NoExecute&lt;/code&gt; and labeled with &lt;code&gt;agones.dev/agones-metrics=true&lt;/code&gt; if available.&lt;/p&gt;

&lt;p&gt;As an example, to set up a dedicated node pool for Prometheus on GKE, run the following command before installing Prometheus. Alternatively you can taint and label nodes manually.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gcloud container node-pools create agones-metrics --cluster=... --zone=... \
  --node-taints agones.dev/agones-metrics=true:NoExecute \
  --node-labels agones.dev/agones-metrics=true \
  --num-nodes=1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;By default we will disable the push gateway (we don&amp;rsquo;t need it for Agones) and other exporters.&lt;/p&gt;

&lt;p&gt;The helm &lt;a href=&#34;https://github.com/helm/charts/tree/master/stable/prometheus&#34;&gt;chart&lt;/a&gt; support &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector&#34;&gt;nodeSelector&lt;/a&gt;, &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity&#34;&gt;affinity&lt;/a&gt; and &lt;a href=&#34;https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/&#34;&gt;toleration&lt;/a&gt;, you can use them to schedule prometheus deployments on an isolated node(s) to have an homogeneous game servers workload.&lt;/p&gt;

&lt;p&gt;This will install a Prometheus Server in your current cluster with &lt;a href=&#34;https://kubernetes.io/docs/concepts/storage/persistent-volumes/&#34;&gt;Persistent Volume Claim&lt;/a&gt; (Deactivated for Minikube and Kind) for storing and querying time series, it will automatically start collecting metrics from Agones Controller.&lt;/p&gt;

&lt;p&gt;Finally to access Prometheus metrics, rules and alerts explorer use&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl port-forward deployments/prom-prometheus-server &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;9090&lt;/span&gt; -n metrics&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
Again you can use our Makefile
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/README.md#prometheus-portforward&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;&lt;code&gt;make prometheus-portforward&lt;/code&gt;&lt;/a&gt;
.
  (For
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/README.md#running-a-test-kind-cluster&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Kind&lt;/a&gt;
 and
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/README.md#running-a-test-minikube-cluster&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Minikube&lt;/a&gt;
 use their specific targets &lt;code&gt;make kind-prometheus-portforward&lt;/code&gt; and &lt;code&gt;make minikube-prometheus-portforward&lt;/code&gt;)
&lt;/div&gt;


&lt;p&gt;Now you can access the prometheus dashboard &lt;a href=&#34;http://localhost:9090&#34;&gt;http://localhost:9090&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;On the landing page you can start exploring metrics by creating &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/basics/&#34;&gt;queries&lt;/a&gt;. You can also verify what &lt;a href=&#34;http://localhost:9090/targets&#34;&gt;targets&lt;/a&gt; Prometheus currently monitors (Header Status &amp;gt; Targets), you should see Agones controller pod in the &lt;code&gt;kubernetes-pods&lt;/code&gt; section.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
Metrics will be first registered when you will start using Agones.
&lt;/div&gt;


&lt;p&gt;Now let&amp;rsquo;s install some Grafana dashboards.&lt;/p&gt;

&lt;h3 id=&#34;grafana-installation&#34;&gt;Grafana installation&lt;/h3&gt;

&lt;p&gt;Grafana is a open source time series analytics platform which supports Prometheus data source. We can also easily import pre-built dashboards.&lt;/p&gt;

&lt;p&gt;First we will install &lt;a href=&#34;#grafana-dashboards&#34;&gt;Agones dashboard&lt;/a&gt; as &lt;a href=&#34;https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/&#34;&gt;config maps&lt;/a&gt; in our cluster.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl apply -f ./build/grafana/&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now we can install &lt;a href=&#34;https://github.com/helm/charts/tree/master/stable/grafana&#34;&gt;grafana chart&lt;/a&gt; from stable repository. (Replace &lt;code&gt;&amp;lt;your-admin-password&amp;gt;&lt;/code&gt; with the admin password of your choice)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;helm install --wait --name grafana stable/grafana --version&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt;.0.13 --namespace metrics &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --set &lt;span style=&#34;color:#000&#34;&gt;adminPassword&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&amp;lt;your-admin-password&amp;gt; -f ./build/grafana.yaml&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will install Grafana with our prepopulated dashboards and prometheus datasource &lt;a href=&#34;#prometheus-installation&#34;&gt;previously installed&lt;/a&gt;&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
You can also use our
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master//build/Makefile&#34; target=&#34;_blank&#34; data-proofer-ignore&gt;Makefile&lt;/a&gt;
 targets (&lt;code&gt;setup-grafana&lt;/code&gt;, &lt;code&gt;minikube-setup-grafana&lt;/code&gt; and &lt;code&gt;kind-setup-grafana&lt;/code&gt;).
&lt;/div&gt;


&lt;p&gt;Finally to access dashboards run&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl port-forward deployments/grafana &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;3000&lt;/span&gt; -n metrics&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Open a web browser to &lt;a href=&#34;http://localhost:3000&#34;&gt;http://localhost:3000&lt;/a&gt;, you should see Agones &lt;a href=&#34;#grafana-dashboards&#34;&gt;dashboards&lt;/a&gt; after login as admin.&lt;/p&gt;



&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;
You can also use our &lt;code&gt;Makefile&lt;/code&gt; targets &lt;code&gt;make grafana-portforward&lt;/code&gt;, &lt;code&gt;make kind-grafana-portforward&lt;/code&gt; and &lt;code&gt;make minikube-grafana-portforward&lt;/code&gt;.
&lt;/div&gt;


&lt;h3 id=&#34;stackdriver-installation&#34;&gt;Stackdriver installation&lt;/h3&gt;

&lt;p&gt;In order to use &lt;a href=&#34;https://app.google.stackdriver.com&#34;&gt;Stackdriver monitoring&lt;/a&gt; you should &lt;a href=&#34;https://cloud.google.com/monitoring/api/enable-api&#34;&gt;enable Stackdriver Monitoring API&lt;/a&gt; on Google Cloud Console. You need to grant all the necessary permissions to the users (see &lt;a href=&#34;https://cloud.google.com/monitoring/access-control&#34;&gt;Access Control Guide&lt;/a&gt;). Stackdriver exporter uses a strategy called Application Default Credentials (ADC) to find your application&amp;rsquo;s credentials. Details could be found here &lt;a href=&#34;https://cloud.google.com/docs/authentication/production&#34;&gt;Setting Up Authentication for Server to Server Production Applications&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Note that Stackdriver monitoring is enabled by default on GKE clusters, however you can follow this &lt;a href=&#34;https://cloud.google.com/kubernetes-engine/docs/how-to/monitoring#enabling_stackdriver_monitoring&#34;&gt;guide&lt;/a&gt; if it was disabled on your GKE cluster.&lt;/p&gt;

&lt;p&gt;Default metrics exporter is Prometheus. If you are using the &lt;a href=&#34;/site/site/docs/installation/install-agones/helm/&#34;&gt;Helm installation&lt;/a&gt;, you can install or upgrade Agones to use Stackdriver, using the following chart parameters:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;helm upgrade --install --wait --set agones.metrics.stackdriverEnabled=true --set agones.metrics.prometheusEnabled=false --set agones.metrics.prometheusServiceDiscovery=false my-release-name agones/agones --namespace=agones-system
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With this configuration only Stackdriver exporter would be used instead of Prometheus exporter.&lt;/p&gt;

&lt;p&gt;Create a Fleet or a Gameserver in order to check that connection with stackdriver API is configured properly and so that you will be able to see the metrics data.&lt;/p&gt;

&lt;p&gt;Visit &lt;a href=&#34;https://app.google.stackdriver.com&#34;&gt;Stackdriver monitoring&lt;/a&gt; website, select your project, or choose &lt;code&gt;Create a new Workspace&lt;/code&gt; and select GCP project where your cluster resides. In &lt;a href=&#34;https://cloud.google.com/monitoring/charts/metrics-explorer&#34;&gt;Stackdriver metrics explorer&lt;/a&gt; you should be able to find new metrics with prefix &lt;code&gt;agones/&lt;/code&gt; after a couple of minutes. Choose the metrics you are interested in and add to a single or separate graphs. Select &lt;code&gt;Kubernetes Container&lt;/code&gt; resource type for each of them. You can create multiple graphs, save them into your dashboard and use various aggregation parameters and reducers for each graph.&lt;/p&gt;

&lt;p&gt;Example of the dashboard appearance is provided below:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;../../../images/stackdriver-metrics-dashboard.png&#34; alt=&#34;stackdriver monitoring dashboard&#34; /&gt;&lt;/p&gt;

&lt;p&gt;Currently there exists only manual way of configuring Stackdriver Dashboard. So it is up to you to set an Alignment Period (minimal is 1 minute), GroupBy, Filter parameters and other graph settings.&lt;/p&gt;

&lt;h4 id=&#34;troubleshooting&#34;&gt;Troubleshooting&lt;/h4&gt;

&lt;p&gt;If you can&amp;rsquo;t see Agones metrics you should have a look at the controller logs for connection errors. Also ensure that your cluster has the necessary credentials to interact with Stackdriver Monitoring. You can configure &lt;code&gt;stackdriverProjectID&lt;/code&gt; manually, if the automatic discovery is not working.&lt;/p&gt;

&lt;p&gt;Permissions problem example from controller logs:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Failed to export to Stackdriver: rpc error: code = PermissionDenied desc = Permission monitoring.metricDescriptors.create denied (or the resource may not exist).
&lt;/code&gt;&lt;/pre&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Access Agones via the Kubernetes API</title>
      <link>/site/docs/guides/access-api/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:41 +0000</pubDate>
      
      <guid>/site/docs/guides/access-api/</guid>
      <description>
        
        
        

&lt;p&gt;Installing Agones creates several &lt;a href=&#34;https://kubernetes.io/docs/concepts/api-extension/custom-resources&#34;&gt;Custom Resource Definitions (CRD)&lt;/a&gt;,
which can be accessed and manipulated through the Kubernetes API.&lt;/p&gt;

&lt;p&gt;The detailed list of Agones CRDs with their parameters could be found here - &lt;a href=&#34;../../reference/agones_crd_api_reference/&#34;&gt;Agones CRD API Reference&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Kubernetes has multiple &lt;a href=&#34;https://kubernetes.io/docs/reference/using-api/client-libraries/&#34;&gt;client libraries&lt;/a&gt;, however,
at time of writing, only
the &lt;a href=&#34;https://github.com/kubernetes/client-go&#34;&gt;Go&lt;/a&gt; and
&lt;a href=&#34;https://github.com/kubernetes-client/python/&#34;&gt;Python&lt;/a&gt; clients are documented to support accessing CRDs.&lt;/p&gt;

&lt;p&gt;This can be found in the &lt;a href=&#34;https://kubernetes.io/docs/concepts/api-extension/custom-resources/#accessing-a-custom-resource&#34;&gt;Accessing a custom resource&lt;/a&gt;
section of the Kubernetes documentation.&lt;/p&gt;

&lt;p&gt;At this time, we recommend interacting with Agones through the Go client that has been generated in this repository,
but other methods may also work as well.&lt;/p&gt;

&lt;h2 id=&#34;go-client&#34;&gt;Go Client&lt;/h2&gt;

&lt;p&gt;Kubernetes Go Client tooling generates a Client for Agones that we can use to interact with the Agones
installation on our Kubernetes cluster.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.go.dev/agones.dev/agones/pkg/client/clientset/versioned&#34;&gt;Godoc for the Agones Client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/kubernetes&#34;&gt;Godoc for the standard Kubernetes Client&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;authentication&#34;&gt;Authentication&lt;/h3&gt;

&lt;p&gt;This client uses the same authentication mechanisms as the Kubernetes API.&lt;/p&gt;

&lt;p&gt;If you plan to run your code in the same cluster as the Agones install, have a look at the
&lt;a href=&#34;https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration&#34;&gt;in cluster configuration&lt;/a&gt;
example from the Kubernetes Client.&lt;/p&gt;

&lt;p&gt;If you plan to run your code outside the Kubernetes cluster as your Agones install,
look at the &lt;a href=&#34;https://github.com/kubernetes/client-go/tree/master/examples/out-of-cluster-client-configuration&#34;&gt;out of cluster configuration&lt;/a&gt;
example from the Kubernetes client.&lt;/p&gt;

&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;

&lt;p&gt;The following is an example of a in-cluster configuration, that creates a &lt;code&gt;Clientset&lt;/code&gt; for Agones
and then creates a &lt;code&gt;GameServer&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A full example code is available in the 
&lt;a href=&#34;https://github.com/googleforgames/agones/blob/master/examples/crd-client/main.go&#34; target=&#34;_blank&#34; data-proofer-ignore&gt; example folder&lt;/a&gt;
.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&lt;/span&gt;

&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;
	&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;

	&lt;span style=&#34;color:#000&#34;&gt;agonesv1&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/agones/pkg/apis/agones/v1&amp;#34;&lt;/span&gt;
	&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/agones/pkg/client/clientset/versioned&amp;#34;&lt;/span&gt;
	&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/agones/pkg/util/runtime&amp;#34;&lt;/span&gt;
	&lt;span style=&#34;color:#000&#34;&gt;corev1&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;k8s.io/api/core/v1&amp;#34;&lt;/span&gt;
	&lt;span style=&#34;color:#000&#34;&gt;metav1&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;k8s.io/apimachinery/pkg/apis/meta/v1&amp;#34;&lt;/span&gt;
	&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;k8s.io/client-go/kubernetes&amp;#34;&lt;/span&gt;
	&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;k8s.io/client-go/rest&amp;#34;&lt;/span&gt;
&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;

&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;main&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
	&lt;span style=&#34;color:#000&#34;&gt;config&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;rest&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;InClusterConfig&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;()&lt;/span&gt;
	&lt;span style=&#34;color:#000&#34;&gt;logger&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;runtime&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NewLoggerWithSource&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;main&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
		&lt;span style=&#34;color:#000&#34;&gt;logger&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;WithError&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;).&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Fatal&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Could not create in cluster config&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;

	&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// Access to standard Kubernetes resources through the Kubernetes Clientset
&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;	&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// We don&amp;#39;t actually need this for this example, but it&amp;#39;s just here for
&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;	&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// illustrative purposes
&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;	&lt;span style=&#34;color:#000&#34;&gt;kubeClient&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;kubernetes&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NewForConfig&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;config&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
		&lt;span style=&#34;color:#000&#34;&gt;logger&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;WithError&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;).&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Fatal&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Could not create the kubernetes clientset&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;

	&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// Access to the Agones resources through the Agones Clientset
&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;	&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// Note that we reuse the same config as we used for the Kubernetes Clientset
&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;	&lt;span style=&#34;color:#000&#34;&gt;agonesClient&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;versioned&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;NewForConfig&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;config&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
		&lt;span style=&#34;color:#000&#34;&gt;logger&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;WithError&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;).&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Fatal&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Could not create the agones api clientset&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;

	&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;// Create a GameServer
&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;&lt;/span&gt;	&lt;span style=&#34;color:#000&#34;&gt;gs&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;agonesv1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GameServer&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;ObjectMeta&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;metav1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;ObjectMeta&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GenerateName&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;udp-server&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;Namespace&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;default&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
		&lt;span style=&#34;color:#000&#34;&gt;Spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;agonesv1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GameServerSpec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
			&lt;span style=&#34;color:#000&#34;&gt;Container&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;udp-server&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
			&lt;span style=&#34;color:#000&#34;&gt;Ports&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[]&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;agonesv1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GameServerPort&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{{&lt;/span&gt;
				&lt;span style=&#34;color:#000&#34;&gt;ContainerPort&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7654&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
				&lt;span style=&#34;color:#000&#34;&gt;HostPort&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;      &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7654&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
				&lt;span style=&#34;color:#000&#34;&gt;Name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;          &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gameport&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
				&lt;span style=&#34;color:#000&#34;&gt;PortPolicy&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;    &lt;span style=&#34;color:#000&#34;&gt;agonesv1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Static&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
				&lt;span style=&#34;color:#000&#34;&gt;Protocol&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;      &lt;span style=&#34;color:#000&#34;&gt;corev1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;ProtocolUDP&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt;
			&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}},&lt;/span&gt;
			&lt;span style=&#34;color:#000&#34;&gt;Template&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;corev1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;PodTemplateSpec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
				&lt;span style=&#34;color:#000&#34;&gt;Spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;corev1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;PodSpec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
					&lt;span style=&#34;color:#000&#34;&gt;Containers&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[]&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;corev1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Container&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{{&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;udp-server&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;Image&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gcr.io/agones-images/udp-server:0.21&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}},&lt;/span&gt;
				&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
			&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
		&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;},&lt;/span&gt;
	&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;
	&lt;span style=&#34;color:#000&#34;&gt;newGS&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;agonesClient&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;AgonesV1&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;().&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;GameServers&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;default&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;).&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Create&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;gs&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt; &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;nil&lt;/span&gt; &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;
		&lt;span style=&#34;color:#204a87&#34;&gt;panic&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;err&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
	&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;

	&lt;span style=&#34;color:#000&#34;&gt;fmt&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Printf&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;New game servers&amp;#39; name is: %s&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;,&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;newGS&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;ObjectMeta&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;Name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In order to create GS using provided example, you can run it as a Kubernetes Job:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;$ kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/master/examples/crd-client/create-gs.yaml --namespace agones-system
$ kubectl get pods --namespace agones-system
NAME                                 READY   STATUS      RESTARTS   AGE
create-gs-6wz86-7qsm5                &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0&lt;/span&gt;/1     Completed   &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0&lt;/span&gt;          6s
$ kubectl logs create-gs-6wz86-7qsm5  --namespace agones-system
&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;\u0026{0xc0001dde00 default}&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;severity&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;info&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;source&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;main&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2020-04-21T11:14:00.477576428Z&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;New GameServer name is: helm-test-server-fxfgg&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;severity&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;info&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;:&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2020-04-21T11:14:00.516024697Z&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You have just created a GameServer using Kubernetes Go Client.&lt;/p&gt;

&lt;h2 id=&#34;direct-access-to-the-rest-api-via-kubectl&#34;&gt;Direct Access to the REST API via Kubectl&lt;/h2&gt;

&lt;p&gt;If there isn&amp;rsquo;t a client written in your preferred language, it is always possible to communicate
directly with Kubernetes API to interact with Agones.&lt;/p&gt;

&lt;p&gt;The Kubernetes API can be authenticated and exposed locally through the
&lt;a href=&#34;https://kubernetes.io/docs/tasks/access-kubernetes-api/http-proxy-access-api/&#34;&gt;&lt;code&gt;kubectl proxy&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;$ kubectl proxy &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;amp;&lt;/span&gt;
Starting to serve on &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;127&lt;/span&gt;.0.0.1:8001

&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# list all Agones endpoints&lt;/span&gt;
$ curl http://localhost:8001/apis &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; grep agones -A &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt; -B &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt;
...
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev&amp;#34;&lt;/span&gt;,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;versions&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
          &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;groupVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;,
          &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;version&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;v1&amp;#34;&lt;/span&gt;
        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
      &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;preferredVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;groupVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;version&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;v1&amp;#34;&lt;/span&gt;
      &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;serverAddressByClientCIDRs&amp;#34;&lt;/span&gt;: null
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
...

&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# List Agones resources&lt;/span&gt;
$ curl http://localhost:8001/apis/agones.dev/v1
&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
  &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;APIResourceList&amp;#34;&lt;/span&gt;,
  &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;apiVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;v1&amp;#34;&lt;/span&gt;,
  &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;groupVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;,
  &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;resources&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gameservers&amp;#34;&lt;/span&gt;,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;singularName&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gameserver&amp;#34;&lt;/span&gt;,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;namespaced&amp;#34;&lt;/span&gt;: true,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;GameServer&amp;#34;&lt;/span&gt;,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;verbs&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;delete&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;deletecollection&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;get&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;list&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;patch&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;create&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;update&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;watch&amp;#34;&lt;/span&gt;
      &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;,
      &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;shortNames&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gs&amp;#34;&lt;/span&gt;
      &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
  &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;
&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;

&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# list all gameservers in the default namespace&lt;/span&gt;
$ curl http://localhost:8001/apis/agones.dev/v1/namespaces/default/gameservers
&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;apiVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;,
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;items&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;apiVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/v1&amp;#34;&lt;/span&gt;,
            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;GameServer&amp;#34;&lt;/span&gt;,
            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;annotations&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;kubectl.kubernetes.io/last-applied-configuration&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;{\&amp;#34;apiVersion\&amp;#34;:\&amp;#34;agones.dev/v1\&amp;#34;,\&amp;#34;kind\&amp;#34;:\&amp;#34;GameServer\&amp;#34;,\&amp;#34;metadata\&amp;#34;:{\&amp;#34;annotations\&amp;#34;:{},\&amp;#34;name\&amp;#34;:\&amp;#34;simple-udp\&amp;#34;,\&amp;#34;namespace\&amp;#34;:\&amp;#34;default\&amp;#34;},\&amp;#34;spec\&amp;#34;:{\&amp;#34;containerPort\&amp;#34;:7654,\&amp;#34;hostPort\&amp;#34;:7777,\&amp;#34;portPolicy\&amp;#34;:\&amp;#34;static\&amp;#34;,\&amp;#34;template\&amp;#34;:{\&amp;#34;spec\&amp;#34;:{\&amp;#34;containers\&amp;#34;:[{\&amp;#34;image\&amp;#34;:\&amp;#34;gcr.io/agones-images/udp-server:0.21\&amp;#34;,\&amp;#34;name\&amp;#34;:\&amp;#34;simple-udp\&amp;#34;}]}}}}\n&amp;#34;&lt;/span&gt;
                &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;clusterName&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;creationTimestamp&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2018-03-02T21:41:05Z&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;finalizers&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
                    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev&amp;#34;&lt;/span&gt;
                &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;generation&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;0&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-udp&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;namespace&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;default&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;resourceVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;760&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;selfLink&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;/apis/agones.dev/v1/namespaces/default/gameservers/simple-udp&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;uid&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;692beea6-1e62-11e8-beb2-080027637781&amp;#34;&lt;/span&gt;
            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;spec&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;PortPolicy&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Static&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;container&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-udp&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;containerPort&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7654&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;health&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;failureThreshold&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;3&lt;/span&gt;,
                    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;initialDelaySeconds&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt;,
                    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;periodSeconds&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;5&lt;/span&gt;
                &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;hostPort&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7777&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;protocol&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;UDP&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;template&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;creationTimestamp&amp;#34;&lt;/span&gt;: null
                    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
                    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;spec&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;containers&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
                            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;image&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gcr.io/agones-images/udp-server:0.21&amp;#34;&lt;/span&gt;,
                                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-udp&amp;#34;&lt;/span&gt;,
                                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;resources&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{}&lt;/span&gt;
                            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
                        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;
                    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
                &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;status&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;address&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;192.168.99.100&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;nodeName&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;port&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7777&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;state&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Ready&amp;#34;&lt;/span&gt;
            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;,
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;GameServerList&amp;#34;&lt;/span&gt;,
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;continue&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;resourceVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1062&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;selfLink&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;/apis/agones.dev/v1/namespaces/default/gameservers&amp;#34;&lt;/span&gt;
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;

&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# allocate a gameserver from a fleet named &amp;#39;simple-udp&amp;#39;, with GameServerAllocation&lt;/span&gt;

$ curl -d &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{&amp;#34;apiVersion&amp;#34;:&amp;#34;allocation.agones.dev/v1&amp;#34;,&amp;#34;kind&amp;#34;:&amp;#34;GameServerAllocation&amp;#34;,&amp;#34;spec&amp;#34;:{&amp;#34;required&amp;#34;:{&amp;#34;matchLabels&amp;#34;:{&amp;#34;agones.dev/fleet&amp;#34;:&amp;#34;simple-udp&amp;#34;}}}}&amp;#39;&lt;/span&gt; -H &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; -X POST http://localhost:8001/apis/allocation.agones.dev/v1/namespaces/default/gameserverallocations

&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;GameServerAllocation&amp;#34;&lt;/span&gt;,
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;apiVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;allocation.agones.dev/v1&amp;#34;&lt;/span&gt;,
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-udp-v6jwb-cmdcv&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;namespace&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;default&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;creationTimestamp&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2019-07-03T17:19:47Z&amp;#34;&lt;/span&gt;
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;spec&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;multiClusterSetting&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;policySelector&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{}&lt;/span&gt;
        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;required&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
            &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;matchLabels&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;agones.dev/fleet&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-udp&amp;#34;&lt;/span&gt;
            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;scheduling&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Packed&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{}&lt;/span&gt;
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;,
    &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;status&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;state&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;Allocated&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gameServerName&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;simple-udp-v6jwb-cmdcv&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;ports&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;[&lt;/span&gt;
            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;{&lt;/span&gt;
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;default&amp;#34;&lt;/span&gt;,
                &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;port&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;7445&lt;/span&gt;
            &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
        &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;]&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;address&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;34.94.118.237&amp;#34;&lt;/span&gt;,
        &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;nodeName&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;gke-test-cluster-default-f11755a7-5km3&amp;#34;&lt;/span&gt;
    &lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You may wish to review the &lt;a href=&#34;/site/site/docs/reference/agones_crd_api_reference/&#34;&gt;Agones Kubernetes API&lt;/a&gt; for the full data structure reference.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&#34;https://kubernetes.io/docs/reference/using-api/api-concepts/&#34;&gt;Kubernetes API Concepts&lt;/a&gt;
section may also provide the more details on the API conventions that are used in the Kubernetes API.&lt;/p&gt;

&lt;h2 id=&#34;next-steps&#34;&gt;Next Steps&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Learn how to use &lt;a href=&#34;/site/site/docs/advanced/allocator-service/&#34;&gt;Allocator Service&lt;/a&gt; for single and multi-cluster Allocation.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Troubleshooting</title>
      <link>/site/docs/guides/troubleshooting/</link>
      <pubDate>Thu, 03 Jan 2019 01:20:49 +0000</pubDate>
      
      <guid>/site/docs/guides/troubleshooting/</guid>
      <description>
        
        
        

&lt;h2 id=&#34;something-went-wrong-with-my-gameserver&#34;&gt;Something went wrong with my GameServer&lt;/h2&gt;

&lt;p&gt;If there is something going wrong with your GameServer, there are a few approaches to determining the cause:&lt;/p&gt;

&lt;p&gt;Depending on what is happening, you may want to run &lt;code&gt;kubectl describe &amp;lt;gameserver name&amp;gt;&lt;/code&gt; to view the events
that are associated with that particular &lt;code&gt;GameServer&lt;/code&gt; resource. This can give you insight into the lifecycle of the
&lt;code&gt;GameServer&lt;/code&gt; and if anything has gone wrong.&lt;/p&gt;

&lt;p&gt;For example, here we can see where the simple-udp example has been moved to the &lt;code&gt;Unhealthy&lt;/code&gt; state
due to a crash in the backing &lt;code&gt;GameServer&lt;/code&gt; Pod container&amp;rsquo;s binary.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;root@6a71afd42291:/go/src/agones.dev/agones# kubectl describe gs simple-udp-zqppv
Name:         simple-udp-zqppv
Namespace:    default
Labels:       &amp;lt;none&amp;gt;
Annotations:  agones.dev/sdk-version: 1.0.0-dce1546
API Version:  agones.dev/v1
Kind:         GameServer
Metadata:
  Creation Timestamp:  2019-08-16T21:25:44Z
  Finalizers:
    agones.dev
  Generate Name:     simple-udp-
  Generation:        1
  Resource Version:  1378575
  Self Link:         /apis/agones.dev/v1/namespaces/default/gameservers/simple-udp-zqppv
  UID:               6818adc7-c06c-11e9-8dbd-42010a8a0109
Spec:
  Container:  simple-udp
  Health:
    Failure Threshold:      3
    Initial Delay Seconds:  5
    Period Seconds:         5
  Ports:
    Container Port:  7654
    Host Port:       7058
    Name:            default
    Port Policy:     Dynamic
    Protocol:        UDP
  Scheduling:        Packed
  Template:
    Metadata:
      Creation Timestamp:  &amp;lt;nil&amp;gt;
    Spec:
      Containers:
        Image:  gcr.io/agones-images/udp-server:0.21
        Name:   simple-udp
        Resources:
          Limits:
            Cpu:     20m
            Memory:  32Mi
          Requests:
            Cpu:     20m
            Memory:  32Mi
Status:
  Address:    35.230.59.117
  Node Name:  gke-test-cluster-default-590db5e4-4s6r
  Ports:
    Name:          default
    Port:          7058
  Reserved Until:  &amp;lt;nil&amp;gt;
  State:           Unhealthy
Events:
  Type     Reason          Age   From                   Message
  ----     ------          ----  ----                   -------
  Normal   PortAllocation  72s   gameserver-controller  Port allocated
  Normal   Creating        72s   gameserver-controller  Pod simple-udp-zqppv created
  Normal   Scheduled       72s   gameserver-controller  Address and port populated
  Normal   RequestReady    67s   gameserver-sidecar     SDK state change
  Normal   Ready           66s   gameserver-controller  SDK.Ready() complete
  Warning  Unhealthy       34s   health-controller      Issue with Gameserver pod
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The backing Pod has the same name as the &lt;code&gt;GameServer&lt;/code&gt; - so it&amp;rsquo;s also worth looking at the
details and events for the Pod to see if there are any issues there, such as restarts due to binary crashes etc.&lt;/p&gt;

&lt;p&gt;For example, you can see the restart count on the gcr.io/agones-images/udp-server:0.21 container
is set to &lt;code&gt;1&lt;/code&gt;, due to the game server binary crash&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;root@6a71afd42291:/go/src/agones.dev/agones# kubectl describe pod simple-udp-zqppv
Name:               simple-udp-zqppv
Namespace:          default
Priority:           0
PriorityClassName:  &amp;lt;none&amp;gt;
Node:               gke-test-cluster-default-590db5e4-4s6r/10.138.0.23
Start Time:         Fri, 16 Aug 2019 21:25:44 +0000
Labels:             agones.dev/gameserver=simple-udp-zqppv
                    agones.dev/role=gameserver
Annotations:        agones.dev/container: simple-udp
                    agones.dev/sdk-version: 1.0.0-dce1546
                    cluster-autoscaler.kubernetes.io/safe-to-evict: false
Status:             Running
IP:                 10.48.1.80
Controlled By:      GameServer/simple-udp-zqppv
Containers:
  simple-udp:
    Container ID:   docker://69eacd03cc89b0636b78abe47926b02183ba84d18fa20649ca443f5232511661
    Image:          gcr.io/agones-images/udp-server:0.21
    Image ID:       docker-pullable://gcr.io/agones-images/udp-server@sha256:6a60eff5e68b88b5ce75ae98082d79cff36cda411a090f3495760e5c3b6c3575
    Port:           7654/UDP
    Host Port:      7058/UDP
    State:          Running
      Started:      Fri, 16 Aug 2019 21:26:22 +0000
    Last State:     Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Fri, 16 Aug 2019 21:25:45 +0000
      Finished:     Fri, 16 Aug 2019 21:26:22 +0000
    Ready:          True
    Restart Count:  1
    Limits:
      cpu:     20m
      memory:  32Mi
    Requests:
      cpu:        20m
      memory:     32Mi
    Liveness:     http-get http://:8080/gshealthz delay=5s timeout=1s period=5s #success=1 #failure=3
    Environment:  &amp;lt;none&amp;gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from empty (ro)
  agones-gameserver-sidecar:
    Container ID:   docker://f3c475c34d26232e19b60be65b03bc6ce41931f4c37e00770d3ab4a36281d31c
    Image:          gcr.io/agones-mark/agones-sdk:1.0.0-dce1546
    Image ID:       docker-pullable://gcr.io/agones-mark/agones-sdk@sha256:4b5693e95ee3023a2b2e2099d102bb6bac58d4ce0ac472e58a09cee6d160cd19
    Port:           &amp;lt;none&amp;gt;
    Host Port:      &amp;lt;none&amp;gt;
    State:          Running
      Started:      Fri, 16 Aug 2019 21:25:48 +0000
    Ready:          True
    Restart Count:  0
    Requests:
      cpu:     30m
    Liveness:  http-get http://:8080/healthz delay=3s timeout=1s period=3s #success=1 #failure=3
    Environment:
      GAMESERVER_NAME:  simple-udp-zqppv
      POD_NAMESPACE:    default (v1:metadata.namespace)
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from agones-sdk-token-vr6qq (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  empty:
    Type:    EmptyDir (a temporary directory that shares a pod&#39;s lifetime)
    Medium:
  agones-sdk-token-vr6qq:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  agones-sdk-token-vr6qq
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  &amp;lt;none&amp;gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age                   From                                             Message
  ----    ------     ----                  ----                                             -------
  Normal  Scheduled  2m32s                 default-scheduler                                Successfully assigned default/simple-udp-zqppv to gke-test-cluster-default-590db5e4-4s6r
  Normal  Pulling    2m31s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  pulling image &amp;quot;gcr.io/agones-mark/agones-sdk:1.0.0-dce1546&amp;quot;
  Normal  Started    2m28s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  Started container
  Normal  Pulled     2m28s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  Successfully pulled image &amp;quot;gcr.io/agones-mark/agones-sdk:1.0.0-dce1546&amp;quot;
  Normal  Created    2m28s                 kubelet, gke-test-cluster-default-590db5e4-4s6r  Created container
  Normal  Created    114s (x2 over 2m31s)  kubelet, gke-test-cluster-default-590db5e4-4s6r  Created container
  Normal  Started    114s (x2 over 2m31s)  kubelet, gke-test-cluster-default-590db5e4-4s6r  Started container
  Normal  Pulled     114s (x2 over 2m31s)  kubelet, gke-test-cluster-default-590db5e4-4s6r  Container image &amp;quot;gcr.io/agones-images/udp-server:0.21&amp;quot; already present on machine
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, you can also get the logs of your &lt;code&gt;GameServer&lt;/code&gt; &lt;code&gt;Pod&lt;/code&gt; as well via &lt;code&gt;kubectl logs &amp;lt;pod name&amp;gt; -c &amp;lt;game server container name&amp;gt;&lt;/code&gt;, for example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;root@6a71afd42291:/go/src/agones.dev/agones# kubectl logs simple-udp-zqppv -c simple-udp
2019/08/16 21:26:23 Creating SDK instance
2019/08/16 21:26:24 Starting Health Ping
2019/08/16 21:26:24 Starting UDP server, listening on port 7654
2019/08/16 21:26:24 Marking this server as ready
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The above commands will only give the most recent container&amp;rsquo;s logs (so we won&amp;rsquo;t get the previous crash), but
you can use &lt;code&gt;kubectl logs --previous=true simple-udp-zqppv -c simple-udp&lt;/code&gt; to get the previous instance of the containers logs, or
use your Kubernetes platform of choice&amp;rsquo;s logging aggregation tools to view the crash details.&lt;/p&gt;

&lt;p&gt;For more tips and tricks, the &lt;a href=&#34;https://kubernetes.io/docs/reference/kubectl/cheatsheet/#interacting-with-running-pods&#34;&gt;Kubernetes Cheatsheet: Interactive with Pods&lt;/a&gt;
 also provides more troubleshooting techniques.&lt;/p&gt;

&lt;h2 id=&#34;how-do-i-see-the-logs-for-agones&#34;&gt;How do I see the logs for Agones?&lt;/h2&gt;

&lt;p&gt;If something is going wrong, and you want to see the logs for Agones, there are potentially two places you will want to
check:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The controller: assuming you installed Agones in the &lt;code&gt;agones-system&lt;/code&gt; namespace, you will find that there
is a single pod called &lt;code&gt;agones-controller-&amp;lt;hash&amp;gt;&lt;/code&gt; (where hash is the unique code that Kubernetes generates)
that exists there, that you can get the logs from. This is the main
controller for Agones, and should be the first place to check when things go wrong.&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt;To get the logs from this controller run:&lt;br /&gt;
&lt;code&gt;kubectl logs --namespace=agones-system agones-controller-&amp;lt;hash&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;The SDK server sidecar: Agones runs a small &lt;a href=&#34;https://grpc.io/&#34;&gt;gRPC&lt;/a&gt; + http server for the SDK in a container in the
same network namespace as the game server container to connect to via the SDK.&lt;br /&gt;
The logs from this SDK server are also useful for tracking down issues, especially if you are having trouble with a
particular &lt;code&gt;GameServer&lt;/code&gt;.&lt;br /&gt;

&lt;ol&gt;
&lt;li&gt;To find the &lt;code&gt;Pod&lt;/code&gt; for the &lt;code&gt;GameServer&lt;/code&gt; look for the pod with a name that is prefixed with the name of the
owning &lt;code&gt;GameServer&lt;/code&gt;. For example if you have a &lt;code&gt;GameServer&lt;/code&gt; named &lt;code&gt;simple-udp&lt;/code&gt;, it&amp;rsquo;s pod could potentially be named
&lt;code&gt;simple-udp-dnbwj&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;To get the logs from that &lt;code&gt;Pod&lt;/code&gt;, we need to specify that we want the logs from the &lt;code&gt;agones-gameserver-sidecar&lt;/code&gt;
container. To do that, run the following:&lt;br /&gt;
&lt;code&gt;kubectl logs simple-udp-dnbwj -c agones-gameserver-sidecar&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Agones uses JSON structured logging, therefore errors will be visible through the &lt;code&gt;&amp;quot;severity&amp;quot;:&amp;quot;info&amp;quot;&lt;/code&gt; key and value.&lt;/p&gt;

&lt;h2 id=&#34;i-uninstalled-agones-before-deleted-all-my-gameservers-and-now-they-won-t-delete&#34;&gt;I uninstalled Agones before deleted all my &lt;code&gt;GameServers&lt;/code&gt; and now they won&amp;rsquo;t delete&lt;/h2&gt;

&lt;p&gt;Agones &lt;code&gt;GameServers&lt;/code&gt; use &lt;a href=&#34;https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#finalizers&#34;&gt;Finalizers&lt;/a&gt;
to manage garbage collection of the &lt;code&gt;GameServers&lt;/code&gt;. This means that if the Agones controller
doesn&amp;rsquo;t remove the finalizer for you (i.e. if it has been uninstalled),  it can be tricky to remove them all.&lt;/p&gt;

&lt;p&gt;Thankfully, if we create a patch to remove the finalizers from all GameServers, we can delete them with impunity.&lt;/p&gt;

&lt;p&gt;A quick one liner to do this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kubectl get gameserver -o name | xargs -n1 -P1 -I{} kubectl patch {} --type=merge -p &#39;{&amp;quot;metadata&amp;quot;: {&amp;quot;finalizers&amp;quot;: []}}&#39;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once this is done, you can &lt;code&gt;kubectl delete gs --all&lt;/code&gt; and clean everything up (if it&amp;rsquo;s not gone already).&lt;/p&gt;

&lt;h2 id=&#34;i-m-getting-forbidden-errors-when-trying-to-install-agones&#34;&gt;I&amp;rsquo;m getting Forbidden errors when trying to install Agones&lt;/h2&gt;

&lt;p&gt;Ensure that you are running Kubernetes 1.12 or later, which does not require any special
clusterrolebindings to install Agones.&lt;/p&gt;

&lt;p&gt;If you want to install Agones on an older version of Kubernetes, you need to create a
clusterrolebinding to add your identity as a cluster admin, e.g.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Kubernetes Engine&lt;/span&gt;
kubectl create clusterrolebinding cluster-admin-binding &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --clusterrole cluster-admin --user &lt;span style=&#34;color:#4e9a06&#34;&gt;`&lt;/span&gt;gcloud config get-value account&lt;span style=&#34;color:#4e9a06&#34;&gt;`&lt;/span&gt;
&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Minikube&lt;/span&gt;
kubectl create clusterrolebinding cluster-admin-binding &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;  --clusterrole&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;cluster-admin --serviceaccount&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;kube-system:default&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;On GKE, &lt;code&gt;gcloud config get-value accounts&lt;/code&gt; will return a lowercase email address, so if
you are using a CamelCase email, you may need to type it in manually.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
