Skip to content

Commit

Permalink
using nginx container
Browse files Browse the repository at this point in the history
  • Loading branch information
danielepolencic committed Jan 9, 2020
1 parent 16b0c46 commit 5109c67
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
7 changes: 5 additions & 2 deletions README.md
Expand Up @@ -4,7 +4,10 @@ This repository is meant to demonstrate how to create definitions for Kubernetes

You can find examples in the following languages:

- [Javascript](javascript/README.md)
- [csharp](csharp/README.md)
- [Java](java/README.md)
- [Go](go/README.md)
- [Python](python/README.md)
- [Node.js](javascript/README.md)
- [csharp](csharp/README.md)

Feel free to contribute if can translate the examples in other languages.
6 changes: 3 additions & 3 deletions csharp/genyaml/Program.cs
Expand Up @@ -23,8 +23,8 @@ static void Main(string[] args)
{
new V1Container()
{
Name = "test-container",
Image = "k8s.gcr.io/busybox",
Name = "test-container",
Image = "nginx",
Env = new List<V1EnvVar>(){
new V1EnvVar(){
Name="ENV", Value="dev"
Expand All @@ -34,7 +34,7 @@ static void Main(string[] args)
}
}
};

var serialiseOptions = new JsonSerializerOptions()
{
WriteIndented = true,
Expand Down
6 changes: 3 additions & 3 deletions csharp/kubectl/Program.cs
Expand Up @@ -27,8 +27,8 @@ static void Main(string[] args)
{
new V1Container()
{
Name = "test-container",
Image = "k8s.gcr.io/busybox",
Name = "test-container",
Image = "nginx",
Env = new List<V1EnvVar>(){
new V1EnvVar(){
Name="ENV", Value="dev"
Expand All @@ -38,7 +38,7 @@ static void Main(string[] args)
}
}
};

var result = client.CreateNamespacedPod(pod, "default");
Console.WriteLine(result);
}
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/java/io/learnk8s/KubernetesClientCLI.java
Expand Up @@ -54,7 +54,7 @@ public static Pod createPod(String environment){
.withNewSpec()
.addNewContainer()
.withName("test-container")
.withImage("k8s.gcr.io/busybox")
.withImage("nginx")
.withEnv(new EnvVarBuilder().withName("ENV").withValue(environment).build())
.endContainer()
.endSpec()
Expand Down
2 changes: 1 addition & 1 deletion javascript/gen-yaml.js
Expand Up @@ -9,7 +9,7 @@ function createPod(environment = 'production') {
containers: [
new Container({
name: 'test-container',
image: 'k8s.gcr.io/busybox',
image: 'nginx',
env: [{ name: 'ENV', value: environment }],
}),
],
Expand Down
2 changes: 1 addition & 1 deletion javascript/kubectl.js
Expand Up @@ -15,7 +15,7 @@ function createPod(environment = 'production') {
containers: [
new Container({
name: 'test-container',
image: 'k8s.gcr.io/busybox',
image: 'nginx',
env: [{ name: 'ENV', value: environment }],
}),
],
Expand Down

0 comments on commit 5109c67

Please sign in to comment.