Cloud Code is designed to help make Kubernetes configuration easier, linting schema for both structure and valid values and providing descriptive errors. Additionally, Cloud Code comes with out-of-the-box solutions for common schema, smart completions, and documentation on hover.
Supported YAML configuration files
- Anthos Config Management
- Cloud Build
- Config Connector
- Migrate for Anthos
Configuring with snippets
Out-of-the-box snippets for common YAML schema (using
Command/Ctrl+Space to view options) make it easy to start a
new YAML file or add to an existing one without errors, while still following
best practices. Additionally, it's easier to work with repetitive fields; fill
in one and Cloud Code fills out the remaining instances.
Currently, the following snippets are offered:
Cloud Build - Cloud Run deployment
Cloud Build - Docker container build
Cloud Build - GKE deployment
Cloud Build - GKE Skaffold deployment
Cloud Build - Go build
Cloud Build - Terraform plan + apply
Config Connector - BigQueryDataset
Config Connector - BigQueryTable
Config Connector - BigtableCluster
Config Connector - BigtableInstance
Config Connector - PubSubSubscription
Config Connector - PubSubTopic
Config Connector - RedisInstance
Config Connector - SpannerInstance
Kubernetes - ConfigMap
Kubernetes - Deployment
Kubernetes - Ingress
Kubernetes - Pod
Kubernetes - Service
Migrate for Anthos - Export
Migrate for Anthos - PersistentVolumeClaim
Migrate for Anthos - StatefulSet
Skaffold - Bazel
Skaffold - Getting-started
Skaffold - Helm deployment
Skaffold - Kaniko
Completing with context
Based on the current schema, Cloud Code will provide contextual completions and relevant docs to help you choose the right option.
Discovering documentation on hover
Cloud Code surfaces relevant documentation when you hover over a value in the schema.
Accessing resource definitions
Quickly view definitions for resources by right-clicking and choosing 'Go to Definition' or 'Peek Definition'.
If you'd like to view the differences between a YAML file in source control and a deployed YAML file, you can use Cloud Code: Diff the current JSON/YAML file with Kubernetes deployed resource from the Command Palette (accessible from the 'Manage' menu ). This will bring up a diff view for you to compare and contrast two schema files.
Working with secrets
Using configuration maps and secrets is a key part of working with Kubernetes. To view the context of a base64 secret with Cloud Code, simply hover over it to decode it.